summaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-21 22:34:56 +0530
committerDavid S. Miller <davem@davemloft.net>2017-09-21 11:44:42 -0700
commit82f5d72da8755cf73387a007ad323a86ea0b5663 (patch)
tree80dcf9a16a51ab4953cb9808b665679dc3c3d841 /drivers/net/can
parentfb4de582a22282fa0f9665fd363dfd3e073c40f6 (diff)
downloadlinux-82f5d72da8755cf73387a007ad323a86ea0b5663.tar.bz2
drivers: net: can: usb: use setup_timer() helper.
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/usb/peak_usb/pcan_usb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c
index 838545ce468d..7e10dbdded28 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb.c
@@ -798,9 +798,8 @@ static int pcan_usb_init(struct peak_usb_device *dev)
int err;
/* initialize a timer needed to wait for hardware restart */
- init_timer(&pdev->restart_timer);
- pdev->restart_timer.function = pcan_usb_restart;
- pdev->restart_timer.data = (unsigned long)dev;
+ setup_timer(&pdev->restart_timer, pcan_usb_restart,
+ (unsigned long)dev);
/*
* explicit use of dev_xxx() instead of netdev_xxx() here: