spi: zynq-qspi: Fix missing spi_unregister_controller when unload module
Subsystems (2)
PATCH 1/1 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.
--- drivers/spi/spi-zynq-qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-zynq-qspi.c +1 -1
@@ -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;
Signature · 1 line
2.20.1
Quoted 14 lines · Axel Lin
Use
devm_spi_register_controllerto fix missingspi_unregister_controllerwhen unload module.Signed-off-by Axel Lin <[email protected]>--- drivers/spi/spi-zynq-qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/spi/spi-zynq-qspi.c +0
-0
drivers/spi/spi-zynq-qspi.c static int zynq_qspi_probe(struct platform_device *pdev) · line 700
Quoted 8 lines
drivers/spi/spi-zynq-qspi.c +1
-1@@ -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;
Thanks,
Michal
Mark Brown
maintainerApplied "spi: zynq-qspi: Fix missing spi_unregister_controller when unload module" to the spi tree
In reply to Axel LinThe patch
spi: zynq-qspi: Fix missing spi_unregister_controller when unload module
has been applied to the spi tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
8eb2fd00f65a96143ed1535bdbf4ca4e129d30d1Mon Sep 17 00:00:00 2001
From: Axel Lin <[email protected]>
Date: Sun, 18 Aug 2019 17:51:13 +0800
Subject: [PATCH] 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.
--- drivers/spi/spi-zynq-qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-zynq-qspi.c +1 -1
@@ -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;
Signature · 1 line
2.20.1