Skip to content

Commit

Permalink
Merge branch 'net-usbnet-convert-to-new-tasklet-api'
Browse files Browse the repository at this point in the history
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 12cc923 ("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>
  • Loading branch information
kuba-moo committed Jan 27, 2021
2 parents 3e4715e + c955e32 commit 6626a02
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6626a02

Please sign in to comment.