spi: spi-fsl-qspi: use devm_spi_register_controller
authorVolker Haspel <volker.haspel@linutronix.de>
Tue, 12 Mar 2019 10:12:03 +0000 (11:12 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 13 Mar 2019 15:18:39 +0000 (15:18 +0000)
commit8fcb830a00f0980ffe38d223cdd9a4d2d24da476
tree06033713a7ebaa013fe4d4b33e07291905d6203a
parent0a9c8998e75b69b3c347751a65ddd5bf7e72b2dd
spi: spi-fsl-qspi: use devm_spi_register_controller

The driver does not clearly unregister the spi controller.
Therefore calling an unbind and bind again will end up in a
Kernel crash.

The function devm_spi_register_controller will automatically
be unregister the SPI device.

Signed-off-by: Volker Haspel <volker.haspel@linutronix.de>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-qspi.c