net: usb: pegasus: use new tasklet API
authorEmil Renner Berthing <kernel@esmil.dk>
Sat, 30 Jan 2021 23:47:28 +0000 (00:47 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Feb 2021 23:51:18 +0000 (15:51 -0800)
This converts the driver to use the new tasklet API introduced in
commit 12cc923f1ccc ("tasklet: Introduce new initialization API")

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/pegasus.c

index 32e1335c94ad03948079c24f961fe24ef360ed94..9a907182569cffe21b8c8bedb903d676daa05684 100644 (file)
@@ -553,12 +553,11 @@ tl_sched:
        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;
 
@@ -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);