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>
This commit is contained in:
parent
41e85e44ed
commit
d77e24f21d
@ -725,10 +725,11 @@ complete_exit:
|
|||||||
* Queue data for transmission if possible and then kick off the
|
* Queue data for transmission if possible and then kick off the
|
||||||
* transfer.
|
* transfer.
|
||||||
*/
|
*/
|
||||||
static void ifx_spi_io(unsigned long data)
|
static void ifx_spi_io(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
struct ifx_spi_device *ifx_dev = (struct ifx_spi_device *) data;
|
struct ifx_spi_device *ifx_dev = from_tasklet(ifx_dev, t,
|
||||||
|
io_work_tasklet);
|
||||||
|
|
||||||
if (!test_and_set_bit(IFX_SPI_STATE_IO_IN_PROGRESS, &ifx_dev->flags) &&
|
if (!test_and_set_bit(IFX_SPI_STATE_IO_IN_PROGRESS, &ifx_dev->flags) &&
|
||||||
test_bit(IFX_SPI_STATE_IO_AVAILABLE, &ifx_dev->flags)) {
|
test_bit(IFX_SPI_STATE_IO_AVAILABLE, &ifx_dev->flags)) {
|
||||||
@ -1067,8 +1068,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
|
|||||||
init_waitqueue_head(&ifx_dev->mdm_reset_wait);
|
init_waitqueue_head(&ifx_dev->mdm_reset_wait);
|
||||||
|
|
||||||
spi_set_drvdata(spi, ifx_dev);
|
spi_set_drvdata(spi, ifx_dev);
|
||||||
tasklet_init(&ifx_dev->io_work_tasklet, ifx_spi_io,
|
tasklet_setup(&ifx_dev->io_work_tasklet, ifx_spi_io);
|
||||||
(unsigned long)ifx_dev);
|
|
||||||
|
|
||||||
set_bit(IFX_SPI_STATE_PRESENT, &ifx_dev->flags);
|
set_bit(IFX_SPI_STATE_PRESENT, &ifx_dev->flags);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user