spi: spl022: switch to use default spi_transfer_one_message()
authorNam Cao <namcao@linutronix.de>
Wed, 29 Nov 2023 16:31:56 +0000 (17:31 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 30 Nov 2023 12:02:40 +0000 (12:02 +0000)
commit9b2ef250b31d46f7ef522bd1bd84942f998bb3f9
tree1f08fa420581141dcd2e207e4c7b557fc1f9b469
parent39cefd85098d12439586824c39f8e1948fac186d
spi: spl022: switch to use default spi_transfer_one_message()

Except for polling mode, this driver's transfer_one_message() makes use
of interrupt handler and tasklet. This is problematic because
spi_transfer_delay_exec(), who may sleep, is called in interrupt handler
and tasklet. This causes the following warning:
BUG: sleeping function called from invalid context at drivers/spi/spi.c:1428

Switch to use the default spi_transfer_one_message() instead, which
calls spi_transfer_delay_exec() appropriately.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/ae1940abd6ff6a9e77b4373cff60007c641a0c6c.1701274975.git.namcao@linutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pl022.c