[PATCH 11/12] [media] wl128x: use setup_timer

From: Geliang Tang
Date: Sat Apr 08 2017 - 21:35:42 EST


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

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

diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c
index 74a1b3e..588e2d6 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -1550,9 +1550,8 @@ int fmc_prepare(struct fmdev *fmdev)
atomic_set(&fmdev->tx_cnt, 1);
fmdev->resp_comp = NULL;

- init_timer(&fmdev->irq_info.timer);
- fmdev->irq_info.timer.function = &int_timeout_handler;
- fmdev->irq_info.timer.data = (unsigned long)fmdev;
+ setup_timer(&fmdev->irq_info.timer, &int_timeout_handler,
+ (unsigned long)fmdev);
/*TODO: add FM_STIC_EVENT later */
fmdev->irq_info.mask = FM_MAL_EVENT;

--
2.9.3