aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-16 19:27:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-20 09:17:44 -0400
commit35c3f85f5ab9cf6e5f0fd268485829a1122f7546 (patch)
tree0ffee650b1cc3a636ab4999fb520e4a7b22212a6 /drivers/pcmcia
parent9577924bb33bc76c7a54c6ebde345f8e4de31a4e (diff)
pcmcia: m32r: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: linux-pcmcia@lists.infradead.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/m32r_cfc.c7
-rw-r--r--drivers/pcmcia/m32r_pcc.c7
2 files changed, 4 insertions, 10 deletions
diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c
index 70b089430fcc..9a4940e56e2f 100644
--- a/drivers/pcmcia/m32r_cfc.c
+++ b/drivers/pcmcia/m32r_cfc.c
@@ -380,11 +380,10 @@ static irqreturn_t pcc_interrupt(int irq, void *dev)
380 return IRQ_RETVAL(handled); 380 return IRQ_RETVAL(handled);
381} /* pcc_interrupt */ 381} /* pcc_interrupt */
382 382
383static void pcc_interrupt_wrapper(u_long data) 383static void pcc_interrupt_wrapper(struct timer_list *unused)
384{ 384{
385 pr_debug("m32r_cfc: pcc_interrupt_wrapper:\n"); 385 pr_debug("m32r_cfc: pcc_interrupt_wrapper:\n");
386 pcc_interrupt(0, NULL); 386 pcc_interrupt(0, NULL);
387 init_timer(&poll_timer);
388 poll_timer.expires = jiffies + poll_interval; 387 poll_timer.expires = jiffies + poll_interval;
389 add_timer(&poll_timer); 388 add_timer(&poll_timer);
390} 389}
@@ -758,9 +757,7 @@ static int __init init_m32r_pcc(void)
758 757
759 /* Finally, schedule a polling interrupt */ 758 /* Finally, schedule a polling interrupt */
760 if (poll_interval != 0) { 759 if (poll_interval != 0) {
761 poll_timer.function = pcc_interrupt_wrapper; 760 timer_setup(&poll_timer, pcc_interrupt_wrapper, 0);
762 poll_timer.data = 0;
763 init_timer(&poll_timer);
764 poll_timer.expires = jiffies + poll_interval; 761 poll_timer.expires = jiffies + poll_interval;
765 add_timer(&poll_timer); 762 add_timer(&poll_timer);
766 } 763 }
diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c
index e50bbf826188..c2239a7e383a 100644
--- a/drivers/pcmcia/m32r_pcc.c
+++ b/drivers/pcmcia/m32r_pcc.c
@@ -386,10 +386,9 @@ static irqreturn_t pcc_interrupt(int irq, void *dev)
386 return IRQ_RETVAL(handled); 386 return IRQ_RETVAL(handled);
387} /* pcc_interrupt */ 387} /* pcc_interrupt */
388 388
389static void pcc_interrupt_wrapper(u_long data) 389static void pcc_interrupt_wrapper(struct timer_list *unused)
390{ 390{
391 pcc_interrupt(0, NULL); 391 pcc_interrupt(0, NULL);
392 init_timer(&poll_timer);
393 poll_timer.expires = jiffies + poll_interval; 392 poll_timer.expires = jiffies + poll_interval;
394 add_timer(&poll_timer); 393 add_timer(&poll_timer);
395} 394}
@@ -729,9 +728,7 @@ static int __init init_m32r_pcc(void)
729 728
730 /* Finally, schedule a polling interrupt */ 729 /* Finally, schedule a polling interrupt */
731 if (poll_interval != 0) { 730 if (poll_interval != 0) {
732 poll_timer.function = pcc_interrupt_wrapper; 731 timer_setup(&poll_timer, pcc_interrupt_wrapper, 0);
733 poll_timer.data = 0;
734 init_timer(&poll_timer);
735 poll_timer.expires = jiffies + poll_interval; 732 poll_timer.expires = jiffies + poll_interval;
736 add_timer(&poll_timer); 733 add_timer(&poll_timer);
737 } 734 }