]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tty: timbuart: convert tasklets to use new tasklet_setup() API
authorAllen Pais <allen.lkml@gmail.com>
Mon, 17 Aug 2020 08:59:21 +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-5-allen.cryptic@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/timbuart.c

index 19d38b504e27d12c3534505e3dce505d70c422ea..2126e6e6dfd162fd8b7c2f5e699bb98ed88dcde5 100644 (file)
@@ -172,9 +172,9 @@ static void timbuart_handle_rx_port(struct uart_port *port, u32 isr, u32 *ier)
        dev_dbg(port->dev, "%s - leaving\n", __func__);
 }
 
-static void timbuart_tasklet(unsigned long arg)
+static void timbuart_tasklet(struct tasklet_struct *t)
 {
-       struct timbuart_port *uart = (struct timbuart_port *)arg;
+       struct timbuart_port *uart = from_tasklet(uart, t, tasklet);
        u32 isr, ier = 0;
 
        spin_lock(&uart->port.lock);
@@ -451,7 +451,7 @@ static int timbuart_probe(struct platform_device *dev)
        }
        uart->port.irq = irq;
 
-       tasklet_init(&uart->tasklet, timbuart_tasklet, (unsigned long)uart);
+       tasklet_setup(&uart->tasklet, timbuart_tasklet);
 
        err = uart_register_driver(&timbuart_driver);
        if (err)