Message ID | 20181116155035.19025-1-ben.dooks@codethink.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | usbnet: use tasklet_init() for usbnet_bh handler | expand |
On Fr, 2018-11-16 at 15:50 +0000, Ben Dooks wrote: > The tasklet initialisation would be better done by tasklet_init() > instead of assuming all the fields are in an ok state by default. > > Note, this does not fix any known bug. > > Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Acked-by: Oliver Neukum <oneukum@suse.com>
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 28d76c827e70..8f7db959d319 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1704,8 +1704,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 = (void (*)(unsigned long))usbnet_bh; - dev->bh.data = (unsigned long)&dev->delay; + tasklet_init(&dev->bh, (void (*)(unsigned long))usbnet_bh, (unsigned long)&dev->delay); INIT_WORK (&dev->kevent, usbnet_deferred_kevent); init_usb_anchor(&dev->deferred); timer_setup(&dev->delay, usbnet_bh, 0);
The tasklet initialisation would be better done by tasklet_init() instead of assuming all the fields are in an ok state by default. Note, this does not fix any known bug. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> --- drivers/net/usb/usbnet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)