Uwe Kleine-König 16a8e2fbb2
spi-mux: Fix false-positive lockdep splats
io_mutex is taken by spi_setup() and spi-mux's .setup() callback calls
spi_setup() which results in a nested lock of io_mutex.

add_lock is taken by spi_add_device(). The device_add() call in there
can result in calling spi-mux's .probe() callback which registers its
own spi controller which in turn results in spi_add_device() being
called again.

To fix this initialize the controller's locks already in
spi_alloc_controller() to give spi_mux_probe() a chance to set the
lockdep subclass.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20211013133710.2679703-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-14 13:32:19 +01:00
..
2021-07-20 13:34:05 +01:00
2020-10-08 23:00:06 +01:00
2021-09-01 15:25:28 -07:00
2021-08-12 12:19:19 +01:00
2020-10-24 10:33:08 -07:00
2021-08-26 12:09:38 +01:00
2021-09-27 18:38:10 +01:00
2021-09-27 12:59:15 +01:00