Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: ifx6x60: convert tasklets to use new tasklet_setup() API

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-4-allen.cryptic@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Allen Pais and committed by
Greg Kroah-Hartman
d77e24f2 41e85e44

+4 -4
+4 -4
drivers/tty/serial/ifx6x60.c
··· 725 725 * Queue data for transmission if possible and then kick off the 726 726 * transfer. 727 727 */ 728 - static void ifx_spi_io(unsigned long data) 728 + static void ifx_spi_io(struct tasklet_struct *t) 729 729 { 730 730 int retval; 731 - struct ifx_spi_device *ifx_dev = (struct ifx_spi_device *) data; 731 + struct ifx_spi_device *ifx_dev = from_tasklet(ifx_dev, t, 732 + io_work_tasklet); 732 733 733 734 if (!test_and_set_bit(IFX_SPI_STATE_IO_IN_PROGRESS, &ifx_dev->flags) && 734 735 test_bit(IFX_SPI_STATE_IO_AVAILABLE, &ifx_dev->flags)) { ··· 1068 1067 init_waitqueue_head(&ifx_dev->mdm_reset_wait); 1069 1068 1070 1069 spi_set_drvdata(spi, ifx_dev); 1071 - tasklet_init(&ifx_dev->io_work_tasklet, ifx_spi_io, 1072 - (unsigned long)ifx_dev); 1070 + tasklet_setup(&ifx_dev->io_work_tasklet, ifx_spi_io); 1073 1071 1074 1072 set_bit(IFX_SPI_STATE_PRESENT, &ifx_dev->flags); 1075 1073