Skip to content

Commit

Permalink
net: usb: pegasus: use new tasklet API
Browse files Browse the repository at this point in the history
This converts the driver to use the new tasklet API introduced in
commit 12cc923 ("tasklet: Introduce new initialization API")

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Emil Renner Berthing authored and Jakub Kicinski committed Feb 2, 2021
1 parent c23d544 commit 23a64c5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/usb/pegasus.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,11 @@ static void read_bulk_callback(struct urb *urb)
tasklet_schedule(&pegasus->rx_tl);
}

static void rx_fixup(unsigned long data)
static void rx_fixup(struct tasklet_struct *t)
{
pegasus_t *pegasus;
pegasus_t *pegasus = from_tasklet(pegasus, t, rx_tl);
int status;

pegasus = (pegasus_t *) data;
if (pegasus->flags & PEGASUS_UNPLUG)
return;

Expand Down Expand Up @@ -1129,7 +1128,7 @@ static int pegasus_probe(struct usb_interface *intf,
goto out1;
}

tasklet_init(&pegasus->rx_tl, rx_fixup, (unsigned long) pegasus);
tasklet_setup(&pegasus->rx_tl, rx_fixup);

INIT_DELAYED_WORK(&pegasus->carrier_check, check_carrier);

Expand Down

0 comments on commit 23a64c5

Please sign in to comment.