merged. Bruce
In message: [linux-yocto][linux-yocto v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc & v5.15/standard/nxp-sdk-5.15/nxp-soc][PATCH] spi: lpspi: release requested DMA channels on 10/05/2022 Xiaolei Wang wrote: > From: Alexander Stein <[email protected]> > > commit f02bff30114f385d53ae3e45141db602923bca5d from upstream. > > The requested DMA channels are never released. Do this in .remove as well > as in .probe. spi_register_controller() can return -EPROBE_DEFER if > cs-gpios are not probed yet. > > Signed-off-by: Alexander Stein <[email protected]> > Link: > https://lore.kernel.org/r/[email protected] > Signed-off-by: Mark Brown <[email protected]> > Signed-off-by: Xiaolei Wang <[email protected]> > Signed-off-by: Bruce Ashfield <[email protected]> > --- > drivers/spi/spi-fsl-lpspi.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c > index 25b1e1d92fc8..ae8c0ed4cf2e 100644 > --- a/drivers/spi/spi-fsl-lpspi.c > +++ b/drivers/spi/spi-fsl-lpspi.c > @@ -926,7 +926,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev) > ret = devm_spi_register_controller(&pdev->dev, controller); > if (ret < 0) { > dev_err(&pdev->dev, "spi_register_controller error.\n"); > - goto out_pm_get; > + goto free_dma; > } > > pm_runtime_mark_last_busy(fsl_lpspi->dev); > @@ -934,6 +934,8 @@ static int fsl_lpspi_probe(struct platform_device *pdev) > > return 0; > > +free_dma: > + fsl_lpspi_dma_exit(controller); > out_pm_get: > pm_runtime_dont_use_autosuspend(fsl_lpspi->dev); > pm_runtime_put_sync(fsl_lpspi->dev); > @@ -950,6 +952,8 @@ static int fsl_lpspi_remove(struct platform_device *pdev) > struct fsl_lpspi_data *fsl_lpspi = > spi_controller_get_devdata(controller); > > + fsl_lpspi_dma_exit(controller); > + > pm_runtime_disable(fsl_lpspi->dev); > return 0; > } > -- > 2.25.1 >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11296): https://lists.yoctoproject.org/g/linux-yocto/message/11296 Mute This Topic: https://lists.yoctoproject.org/mt/91008317/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
