summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/sja1000/peak_pcmcia.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-25 03:51:14 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-27 12:09:15 +0900
commit550acfb37ffeee9ff00f7f13f087ad1c33a74b29 (patch)
treee129c181d9dd28ffe0df8ef3722429129bb962b5 /drivers/net/can/sja1000/peak_pcmcia.c
parent0ff624fbfefbb96db62d100bda84e4fbdabaf628 (diff)
downloadlinux-550acfb37ffeee9ff00f7f13f087ad1c33a74b29.tar.bz2
drivers/net: can: 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: Wolfgang Grandegger <wg@grandegger.com> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Allen Pais <allen.lkml@gmail.com> Cc: linux-can@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can/sja1000/peak_pcmcia.c')
-rw-r--r--drivers/net/can/sja1000/peak_pcmcia.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/can/sja1000/peak_pcmcia.c b/drivers/net/can/sja1000/peak_pcmcia.c
index 4b8758e10bd4..485b19c9ae47 100644
--- a/drivers/net/can/sja1000/peak_pcmcia.c
+++ b/drivers/net/can/sja1000/peak_pcmcia.c
@@ -381,9 +381,9 @@ static inline void pcan_set_can_power(struct pcan_pccard *card, int onoff)
/*
* set leds state according to channel activity
*/
-static void pcan_led_timer(unsigned long arg)
+static void pcan_led_timer(struct timer_list *t)
{
- struct pcan_pccard *card = (struct pcan_pccard *)arg;
+ struct pcan_pccard *card = from_timer(card, t, led_timer);
struct net_device *netdev;
int i, up_count = 0;
u8 ccr;
@@ -692,7 +692,7 @@ static int pcan_probe(struct pcmcia_device *pdev)
}
/* init the timer which controls the leds */
- setup_timer(&card->led_timer, pcan_led_timer, (unsigned long)card);
+ timer_setup(&card->led_timer, pcan_led_timer, 0);
/* request the given irq */
err = request_irq(pdev->irq, &pcan_isr, IRQF_SHARED, PCC_NAME, card);