]> git.baikalelectronics.ru Git - kernel.git/commit
spi: Don't have controller clean up spi device before driver unbind
authorSaravana Kannan <saravanak@google.com>
Wed, 5 May 2021 16:47:34 +0000 (09:47 -0700)
committerMark Brown <broonie@kernel.org>
Fri, 14 May 2021 12:24:56 +0000 (13:24 +0100)
commitd963552356f41b48799aa646ed24172976826fa5
tree78860614e503f9a9621589d47c5f0a89c398008e
parent0f4cbf5af5510c51e7360abda22284f525c9b312
spi: Don't have controller clean up spi device before driver unbind

When a spi device is unregistered and triggers a driver unbind, the
driver might need to access the spi device. So, don't have the
controller clean up the spi device before the driver is unbound. Clean
up the spi device after the driver is unbound.

Fixes: 60c6e3045243 ("spi: Fix spi device unregister flow")
Reported-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210505164734.175546-1-saravanak@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c