linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: zynq-qspi: Fix missing spi_unregister_controller when unload module
@ 2019-08-18  9:51 Axel Lin
  2019-08-19  6:54 ` Michal Simek
  2019-08-20 12:54 ` Applied "spi: zynq-qspi: Fix missing spi_unregister_controller when unload module" to the spi tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2019-08-18  9:51 UTC (permalink / raw)
  To: Mark Brown; +Cc: Axel Lin, Michal Simek, linux-arm-kernel, linux-spi

Use devm_spi_register_controller to fix missing spi_unregister_controller
when unload module.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/spi/spi-zynq-qspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-zynq-qspi.c b/drivers/spi/spi-zynq-qspi.c
index 3155e2cabb1e..4a5326ccf65a 100644
--- a/drivers/spi/spi-zynq-qspi.c
+++ b/drivers/spi/spi-zynq-qspi.c
@@ -694,7 +694,7 @@ static int zynq_qspi_probe(struct platform_device *pdev)
 	ctlr->setup = zynq_qspi_setup_op;
 	ctlr->max_speed_hz = clk_get_rate(xqspi->refclk) / 2;
 	ctlr->dev.of_node = np;
-	ret = spi_register_controller(ctlr);
+	ret = devm_spi_register_controller(&pdev->dev, ctlr);
 	if (ret) {
 		dev_err(&pdev->dev, "spi_register_master failed\n");
 		goto clk_dis_all;
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-20 12:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-18  9:51 [PATCH] spi: zynq-qspi: Fix missing spi_unregister_controller when unload module Axel Lin
2019-08-19  6:54 ` Michal Simek
2019-08-20 12:54 ` Applied "spi: zynq-qspi: Fix missing spi_unregister_controller when unload module" to the spi tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).