Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1619417

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

From Geliang Tang <geliangtang@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 09/12] [media] s5p-mfc: use setup_timer
Date 2017-04-09 03:40 +0200
Message-ID <tu9ZE-4FS-11@gated-at.bofh.it> (permalink)
References <tu9ZD-4FS-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH 09/12] [media] s5p-mfc: use setup_timer Geliang Tang <geliangtang@gmail.com> - 2017-04-09 03:40 +0200
  Re: [PATCH 09/12] [media] s5p-mfc: use setup_timer Sylwester Nawrocki <s.nawrocki@samsung.com> - 2017-04-10 10:40 +0200

csiph-web