Commit 8eb2fd00 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

spi: zynq-qspi: Fix missing spi_unregister_controller when unload module

Use devm_spi_register_controller to fix missing spi_unregister_controller
when unload module.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarMichal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/20190818095113.2397-1-axel.lin@ingics.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 52718908
......@@ -695,7 +695,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;
......
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