net: usbnet: initialize tasklet using tasklet_init
authorEmil Renner Berthing <kernel@esmil.dk>
Sat, 23 Jan 2021 17:32:20 +0000 (18:32 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 27 Jan 2021 02:04:26 +0000 (18:04 -0800)
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>
drivers/net/usb/usbnet.c

index 305c5f7b9a9ba785ff70ca38de3649c2d3356c3f..0fa31f1e9f7e99ff2d49183f71c764606be12a1b 100644 (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->done);
        skb_queue_head_init(&dev->rxq_pause);
-       dev->bh.func = usbnet_bh_tasklet;
-       dev->bh.data = (unsigned long)&dev->delay;
+       tasklet_init(&dev->bh, usbnet_bh_tasklet, (unsigned long)&dev->delay);
        INIT_WORK (&dev->kevent, usbnet_deferred_kevent);
        init_usb_anchor(&dev->deferred);
        timer_setup(&dev->delay, usbnet_bh, 0);