diff options
author | Matej Hulín | 2017-01-23 07:12:30 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2017-02-03 11:23:51 -0200 |
commit | 75d1b1379fba4ca2fb6fb7b70141ac0afb807fbf (patch) | |
tree | 820ad9d0ed335deebe061105921412b538fa1121 | |
parent | ca80fbcd4ce61686d863fb9aca1fa3d6a9276361 (diff) |
[media] media: radio-cadet, initialize timer with setup_timer
Stop accessing timer struct members directly and use the setup_timer
helper intended for that use. It makes the code cleaner and will allow
for easier change of the timer struct internals.
Signed-off-by: Matej Hulín <mito.hulin@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/radio/radio-cadet.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c index 82affaedf067..cbaf850f4791 100644 --- a/drivers/media/radio/radio-cadet.c +++ b/drivers/media/radio/radio-cadet.c @@ -309,9 +309,7 @@ static void cadet_handler(unsigned long data) /* * Clean up and exit */ - init_timer(&dev->readtimer); - dev->readtimer.function = cadet_handler; - dev->readtimer.data = data; + setup_timer(&dev->readtimer, cadet_handler, data); dev->readtimer.expires = jiffies + msecs_to_jiffies(50); add_timer(&dev->readtimer); } @@ -320,9 +318,7 @@ static void cadet_start_rds(struct cadet *dev) { dev->rdsstat = 1; outb(0x80, dev->io); /* Select RDS fifo */ - init_timer(&dev->readtimer); - dev->readtimer.function = cadet_handler; - dev->readtimer.data = (unsigned long)dev; + setup_timer(&dev->readtimer, cadet_handler, (unsigned long)dev); dev->readtimer.expires = jiffies + msecs_to_jiffies(50); add_timer(&dev->readtimer); } |