[1/2] net: usbnet: initialize tasklet using tasklet_init
diff mbox series

Message ID 20210123173221.5855-2-esmil@mailme.dk
State Accepted
Commit 90a586b8d741b4b8a1368f6a2ccf858e1a0fe23c
Headers show
Series
  • net: usbnet: convert to new tasklet API
Related show

Commit Message

Emil Renner Berthing Jan. 23, 2021, 5:32 p.m. UTC
From: Emil Renner Berthing <kernel@esmil.dk>

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

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
---
 drivers/net/usb/usbnet.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Oliver Neukum Feb. 1, 2021, 10:36 a.m. UTC | #1
Am Samstag, den 23.01.2021, 18:32 +0100 schrieb Emil Renner Berthing:
> From: Emil Renner Berthing <kernel@esmil.dk>
> 
> Initialize tasklet using tasklet_init() rather than open-coding it.
> 
> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Acked-by: Oliver Neukum <oneukum@suse.com>

Patch
diff mbox series

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 1447da1d5729..26455c76588f 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -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);