提交 82f5d72d 编写于 作者: A Allen Pais 提交者: David S. Miller

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: NAllen Pais <allen.lkml@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fb4de582
...@@ -798,9 +798,8 @@ static int pcan_usb_init(struct peak_usb_device *dev) ...@@ -798,9 +798,8 @@ static int pcan_usb_init(struct peak_usb_device *dev)
int err; int err;
/* initialize a timer needed to wait for hardware restart */ /* initialize a timer needed to wait for hardware restart */
init_timer(&pdev->restart_timer); setup_timer(&pdev->restart_timer, pcan_usb_restart,
pdev->restart_timer.function = pcan_usb_restart; (unsigned long)dev);
pdev->restart_timer.data = (unsigned long)dev;
/* /*
* explicit use of dev_xxx() instead of netdev_xxx() here: * explicit use of dev_xxx() instead of netdev_xxx() here:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册