Skip to content
Unverified Commit e4d63473 authored by Patrice Chotard's avatar Patrice Chotard Committed by Mark Brown
Browse files

spi: stm32-qspi: Update spi registering

Some device driver need to communicate to qspi device during the remove
process, qspi controller must be functional when spi_unregister_master()
is called.

To ensure this, replace devm_spi_register_master() by spi_register_master()
and spi_unregister_master() is called directly in .remove callback before
stopping the qspi controller.

This issue was put in evidence using kernel v5.11 and later
with a spi-nor which supports the software reset feature introduced
by commit d73ee753 ("mtd: spi-nor: core: perform a Soft Reset on
shutdown")

Fixes: c530cd1d

 ("spi: spi-mem: add stm32 qspi controller")

Signed-off-by: default avatarPatrice Chotard <patrice.chotard@foss.st.com>
Cc: <stable@vger.kernel.org> # 5.8.x
Reviewed-by: default avatarLukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/20220117121744.29729-1-patrice.chotard@foss.st.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 44ea6281
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment