summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-01-26 18:04:28 -0800
committerJakub Kicinski <kuba@kernel.org>2021-01-26 18:04:28 -0800
commit6626a0266566c5aea16178c5e6cd7fc4db3f2f56 (patch)
tree79cd58a36aca46cc33515f5d1461496e36d6f976
parent3e4715ec58ff48015270971f33eafc956cf5ca3f (diff)
parentc955e329bb9d44fab75cf2116542fcc0de0473c5 (diff)
Merge branch 'net-usbnet-convert-to-new-tasklet-api'
Emil Renner Berthing says: ==================== net: usbnet: convert to new tasklet API This converts the usbnet driver to use the new tasklet API introduced in commit 12cc923f1ccc ("tasklet: Introduce new initialization API") It is split into two commits for ease of reviewing. ==================== Link: https://lore.kernel.org/r/20210123173221.5855-1-esmil@mailme.dk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/usb/usbnet.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 305c5f7b9a9b..b4c8080e6f87 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,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_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);