spi: take the SPI IO-mutex in the spi_set_cs_timing method
authorLeilk Liu <leilk.liu@mediatek.com>
Sat, 8 May 2021 06:02:14 +0000 (14:02 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 10 May 2021 12:00:28 +0000 (13:00 +0100)
commitdc5fa590273890a8541ce6e999d606bfb2d73797
tree8cfe049a27dba5dd046e314a1047644eeead04fa
parent680ec0549a055eb464dce6ffb4bfb736ef87236e
spi: take the SPI IO-mutex in the spi_set_cs_timing method

this patch takes the io_mutex to prevent an unprotected HW
register modification in the set_cs_timing callback.

Fixes: 4cea6b8cc34e ("spi: add power control when set_cs_timing")
Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
Link: https://lore.kernel.org/r/20210508060214.1485-1-leilk.liu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c