]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tty: ipwireless: convert tasklets to use new tasklet_setup() API
authorAllen Pais <allen.lkml@gmail.com>
Mon, 17 Aug 2020 08:59:18 +0000 (14:29 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Aug 2020 11:33:13 +0000 (13:33 +0200)
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200817085921.26033-2-allen.cryptic@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/ipwireless/hardware.c

index 6bbf35682d5310cd1226410b4fdf91dfff1ae67a..f5d3e68f575071c1fb3cc32f114202688ca67be2 100644 (file)
@@ -1006,9 +1006,9 @@ static int send_pending_packet(struct ipw_hardware *hw, int priority_limit)
 /*
  * Send and receive all queued packets.
  */
-static void ipwireless_do_tasklet(unsigned long hw_)
+static void ipwireless_do_tasklet(struct tasklet_struct *t)
 {
-       struct ipw_hardware *hw = (struct ipw_hardware *) hw_;
+       struct ipw_hardware *hw = from_tasklet(hw, t, tasklet);
        unsigned long flags;
 
        spin_lock_irqsave(&hw->lock, flags);
@@ -1635,7 +1635,7 @@ struct ipw_hardware *ipwireless_hardware_create(void)
        INIT_LIST_HEAD(&hw->rx_queue);
        INIT_LIST_HEAD(&hw->rx_pool);
        spin_lock_init(&hw->lock);
-       tasklet_init(&hw->tasklet, ipwireless_do_tasklet, (unsigned long) hw);
+       tasklet_setup(&hw->tasklet, ipwireless_do_tasklet);
        INIT_WORK(&hw->work_rx, ipw_receive_data_work);
        timer_setup(&hw->setup_timer, ipwireless_setup_timer, 0);