net: usbnet: initialize tasklet using tasklet_init

Initialize tasklet using tasklet_init() rather than open-coding it.

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Emil Renner Berthing 2021-01-23 18:32:20 +01:00 committed by Jakub Kicinski
parent 3e4715ec58
commit 90a586b8d7

View File

@ -1673,8 +1673,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
skb_queue_head_init (&dev->txq); skb_queue_head_init (&dev->txq);
skb_queue_head_init (&dev->done); skb_queue_head_init (&dev->done);
skb_queue_head_init(&dev->rxq_pause); skb_queue_head_init(&dev->rxq_pause);
dev->bh.func = usbnet_bh_tasklet; tasklet_init(&dev->bh, usbnet_bh_tasklet, (unsigned long)&dev->delay);
dev->bh.data = (unsigned long)&dev->delay;
INIT_WORK (&dev->kevent, usbnet_deferred_kevent); INIT_WORK (&dev->kevent, usbnet_deferred_kevent);
init_usb_anchor(&dev->deferred); init_usb_anchor(&dev->deferred);
timer_setup(&dev->delay, usbnet_bh, 0); timer_setup(&dev->delay, usbnet_bh, 0);