Commit 8fcb830a authored by Volker Haspel's avatar Volker Haspel Committed by Mark Brown

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: default avatarVolker Haspel <volker.haspel@linutronix.de>
Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0a9c8998
...@@ -882,7 +882,7 @@ static int fsl_qspi_probe(struct platform_device *pdev) ...@@ -882,7 +882,7 @@ static int fsl_qspi_probe(struct platform_device *pdev)
ctlr->dev.of_node = np; ctlr->dev.of_node = np;
ret = spi_register_controller(ctlr); ret = devm_spi_register_controller(dev, ctlr);
if (ret) if (ret)
goto err_destroy_mutex; goto err_destroy_mutex;
......
Markdown is supported
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