Re: [PATCH] spi: zynq-qspi: Fix missing spi_unregister_controller when unload module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18. 08. 19 11:51, Axel Lin wrote:
> Use devm_spi_register_controller to fix missing spi_unregister_controller
> when unload module.
> 
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
> ---
>  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;
> 

Acked-by: Michal Simek <michal.simek@xxxxxxxxxx>

Thanks,
Michal



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux