[PATCH 09/12] [media] s5p-mfc: use setup_timer

From: Geliang Tang
Date: Sat Apr 08 2017 - 21:36:37 EST


Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index bb0a588..2c363aa 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1266,9 +1266,8 @@ static int s5p_mfc_probe(struct platform_device *pdev)
dev->hw_lock = 0;
INIT_WORK(&dev->watchdog_work, s5p_mfc_watchdog_worker);
atomic_set(&dev->watchdog_cnt, 0);
- init_timer(&dev->watchdog_timer);
- dev->watchdog_timer.data = (unsigned long)dev;
- dev->watchdog_timer.function = s5p_mfc_watchdog;
+ setup_timer(&dev->watchdog_timer, s5p_mfc_watchdog,
+ (unsigned long)dev);

/* Initialize HW ops and commands based on MFC version */
s5p_mfc_init_hw_ops(dev);
--
2.9.3