Skip to content

Commit

Permalink
net: usb: r8152: 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 23a64c5 commit f3163f1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/net/usb/r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -2393,11 +2393,9 @@ static void tx_bottom(struct r8152 *tp)
} while (res == 0);
}

static void bottom_half(unsigned long data)
static void bottom_half(struct tasklet_struct *t)
{
struct r8152 *tp;

tp = (struct r8152 *)data;
struct r8152 *tp = from_tasklet(tp, t, tx_tl);

if (test_bit(RTL8152_UNPLUG, &tp->flags))
return;
Expand Down Expand Up @@ -6714,7 +6712,7 @@ static int rtl8152_probe(struct usb_interface *intf,
mutex_init(&tp->control);
INIT_DELAYED_WORK(&tp->schedule, rtl_work_func_t);
INIT_DELAYED_WORK(&tp->hw_phy_work, rtl_hw_phy_work_func_t);
tasklet_init(&tp->tx_tl, bottom_half, (unsigned long)tp);
tasklet_setup(&tp->tx_tl, bottom_half);
tasklet_disable(&tp->tx_tl);

netdev->netdev_ops = &rtl8152_netdev_ops;
Expand Down

0 comments on commit f3163f1

Please sign in to comment.