On Wed, May 5, 2021 at 8:26 PM Saravana Kannan <saravanak@xxxxxxxxxx> wrote: > > 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: c7299fea6769 ("spi: Fix spi device unregister flow") > Reported-by: Lukas Wunner <lukas@xxxxxxxxx> And Suggested-by: Lukas ... > Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx> ... > Can you test this one your end to make sure you don't have issues > anymore? Do you need a test on my setup? ... > + device_del(&spi->dev); > + spi_cleanup(spi); > + put_device(&spi->dev); This block deserves a comment in the code. -- With Best Regards, Andy Shevchenko