* usbnet: use tasklet_init() for usbnet_bh handler
@ 2018-11-16 15:50 Ben Dooks
0 siblings, 0 replies; 2+ messages in thread
From: Ben Dooks @ 2018-11-16 15:50 UTC (permalink / raw)
To: oneukum, linux-usb; +Cc: davem, linux-kernel, Ben Dooks
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(-)
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* usbnet: use tasklet_init() for usbnet_bh handler
@ 2018-11-19 9:41 Oliver Neukum
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Neukum @ 2018-11-19 9:41 UTC (permalink / raw)
To: Ben Dooks, linux-usb; +Cc: davem, linux-kernel
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-19 9:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-19 9:41 usbnet: use tasklet_init() for usbnet_bh handler Oliver Neukum
-- strict thread matches above, loose matches on Subject: below --
2018-11-16 15:50 Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).