[PATCH 07/12] [media] av7110: use setup_timer

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


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

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

diff --git a/drivers/media/pci/ttpci/av7110_ir.c b/drivers/media/pci/ttpci/av7110_ir.c
index 10e28f0..ca05198 100644
--- a/drivers/media/pci/ttpci/av7110_ir.c
+++ b/drivers/media/pci/ttpci/av7110_ir.c
@@ -333,9 +333,8 @@ int av7110_ir_init(struct av7110 *av7110)
av_list[av_cnt++] = av7110;
av7110_check_ir_config(av7110, true);

- init_timer(&av7110->ir.keyup_timer);
- av7110->ir.keyup_timer.function = av7110_emit_keyup;
- av7110->ir.keyup_timer.data = (unsigned long) &av7110->ir;
+ setup_timer(&av7110->ir.keyup_timer, av7110_emit_keyup,
+ (unsigned long)&av7110->ir);

input_dev = input_allocate_device();
if (!input_dev)
--
2.9.3