Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: pl022: fix controller deregistration

Make sure to deregister the controller before releasing underlying
resources like DMA during driver unbind.

Fixes: b43d65f7e818 ("[ARM] 5546/1: ARM PL022 SSP/SPI driver v3")
Cc: stable@vger.kernel.org # 2.6.31
Cc: Linus Walleij <linusw@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-9-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
994b3336 420df79d

+7 -1
+7 -1
drivers/spi/spi-pl022.c
··· 1956 1956 1957 1957 /* Register with the SPI framework */ 1958 1958 amba_set_drvdata(adev, pl022); 1959 - status = devm_spi_register_controller(&adev->dev, host); 1959 + status = spi_register_controller(host); 1960 1960 if (status != 0) { 1961 1961 dev_err_probe(&adev->dev, status, 1962 1962 "problem registering spi host\n"); ··· 1997 1997 if (!pl022) 1998 1998 return; 1999 1999 2000 + spi_controller_get(pl022->host); 2001 + 2002 + spi_unregister_controller(pl022->host); 2003 + 2000 2004 /* 2001 2005 * undo pm_runtime_put() in probe. I assume that we're not 2002 2006 * accessing the primecell here. ··· 2012 2008 pl022_dma_remove(pl022); 2013 2009 2014 2010 amba_release_regions(adev); 2011 + 2012 + spi_controller_put(pl022->host); 2015 2013 } 2016 2014 2017 2015 #ifdef CONFIG_PM_SLEEP