Commit f3163f1c authored by Emil Renner Berthing's avatar Emil Renner Berthing Committed by Jakub Kicinski

net: usb: r8152: use new tasklet API

This converts the driver to use the new tasklet API introduced in
commit 12cc923f ("tasklet: Introduce new initialization API")
Signed-off-by: default avatarEmil Renner Berthing <kernel@esmil.dk>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 23a64c51
...@@ -2393,11 +2393,9 @@ static void tx_bottom(struct r8152 *tp) ...@@ -2393,11 +2393,9 @@ static void tx_bottom(struct r8152 *tp)
} while (res == 0); } while (res == 0);
} }
static void bottom_half(unsigned long data) static void bottom_half(struct tasklet_struct *t)
{ {
struct r8152 *tp; struct r8152 *tp = from_tasklet(tp, t, tx_tl);
tp = (struct r8152 *)data;
if (test_bit(RTL8152_UNPLUG, &tp->flags)) if (test_bit(RTL8152_UNPLUG, &tp->flags))
return; return;
...@@ -6714,7 +6712,7 @@ static int rtl8152_probe(struct usb_interface *intf, ...@@ -6714,7 +6712,7 @@ static int rtl8152_probe(struct usb_interface *intf,
mutex_init(&tp->control); mutex_init(&tp->control);
INIT_DELAYED_WORK(&tp->schedule, rtl_work_func_t); INIT_DELAYED_WORK(&tp->schedule, rtl_work_func_t);
INIT_DELAYED_WORK(&tp->hw_phy_work, rtl_hw_phy_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); tasklet_disable(&tp->tx_tl);
netdev->netdev_ops = &rtl8152_netdev_ops; netdev->netdev_ops = &rtl8152_netdev_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment