From: Emil Renner Berthing <esmil@mailme.dk>
To: linux-usb@vger.kernel.org, netdev@vger.kernel.org
Cc: Emil Renner Berthing <kernel@esmil.dk>,
Oliver Neukum <oneukum@suse.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] net: usbnet: use new tasklet API
Date: Sat, 23 Jan 2021 18:32:21 +0100 [thread overview]
Message-ID: <20210123173221.5855-3-esmil@mailme.dk> (raw)
In-Reply-To: <20210123173221.5855-1-esmil@mailme.dk>
From: Emil Renner Berthing <kernel@esmil.dk>
This converts the driver to use the new tasklet API introduced in
commit 12cc923f1ccc ("tasklet: Introduce new initialization API")
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
---
drivers/net/usb/usbnet.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 26455c76588f..e3f1b419a98f 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1539,11 +1539,11 @@ static void usbnet_bh (struct timer_list *t)
}
}
-static void usbnet_bh_tasklet(unsigned long data)
+static void usbnet_bh_tasklet(struct tasklet_struct *t)
{
- struct timer_list *t = (struct timer_list *)data;
+ struct usbnet *dev = from_tasklet(dev, t, bh);
- usbnet_bh(t);
+ usbnet_bh(&dev->delay);
}
@@ -1673,7 +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);
- tasklet_init(&dev->bh, usbnet_bh_tasklet, (unsigned long)&dev->delay);
+ tasklet_setup(&dev->bh, usbnet_bh_tasklet);
INIT_WORK (&dev->kevent, usbnet_deferred_kevent);
init_usb_anchor(&dev->deferred);
timer_setup(&dev->delay, usbnet_bh, 0);
--
2.30.0
next prev parent reply other threads:[~2021-01-23 17:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-23 17:32 [PATCH 0/2] net: usbnet: convert to new tasklet API Emil Renner Berthing
2021-01-23 17:32 ` [PATCH 1/2] net: usbnet: initialize tasklet using tasklet_init Emil Renner Berthing
2021-02-01 10:36 ` Oliver Neukum
2021-01-23 17:32 ` Emil Renner Berthing [this message]
2021-02-01 10:36 ` [PATCH 2/2] net: usbnet: use new tasklet API Oliver Neukum
2021-01-27 2:10 ` [PATCH 0/2] net: usbnet: convert to " patchwork-bot+netdevbpf
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=20210123173221.5855-3-esmil@mailme.dk \
--to=esmil@mailme.dk \
--cc=davem@davemloft.net \
--cc=kernel@esmil.dk \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).