From: Ben Dooks <ben.dooks@codethink.co.uk>
To: oneukum@suse.com, linux-usb@vger.kernel.org
Cc: davem@davemloft.net, linux-kernel@vger.kernel.org,
Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH] usbnet: use tasklet_init() for usbnet_bh handler
Date: Fri, 16 Nov 2018 15:50:35 +0000 [thread overview]
Message-ID: <20181116155035.19025-1-ben.dooks@codethink.co.uk> (raw)
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);
--
2.19.1
next reply other threads:[~2018-11-16 15:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-16 15:50 Ben Dooks [this message]
2018-11-19 9:41 ` Oliver Neukum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181116155035.19025-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome