soc: Switch back to struct platform_driver::remove()After commit 0edb555a65d1 ("platform: Make platform_driver::remove()return void") .remove() is (again) the right callback to implement forplatf
soc: Switch back to struct platform_driver::remove()After commit 0edb555a65d1 ("platform: Make platform_driver::remove()return void") .remove() is (again) the right callback to implement forplatform drivers.Convert all platform drivers below drivers/soc to use .remove(), withthe eventual goal to drop struct platform_driver::remove_new(). As.remove() and .remove_new() have the same prototypes, conversion is doneby just changing the structure member name in the driver initializer.On the way do a few whitespace changes to make indention consistent.Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>Acked-by: Heiko Stuebner <heiko@sntech.de>Acked-by: Herve Codina <herve.codina@bootlin.com> # for fsl/qe/{qmc,tsa}.cAcked-by: Bjorn Andersson <andersson@kernel.org> # qcom partsAcked-by: Gabriel Somlo <gsomlo@gmail.com>Acked-by: Andrew Jeffery <andrew@codeconstruct.com.au> # aspeedLink: https://lore.kernel.org/r/20241029074859.509587-2-u.kleine-koenig@baylibre.comSigned-off-by: Arnd Bergmann <arnd@arndb.de>
show more ...
spi: pxa2xx: Use proper SSP header in soc/pxa/ssp.cThere is nothing from pxa2xx_spi.h used by soc/pxa/ssp.c.Replace it with pxa2xx_ssp.h.Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.i
spi: pxa2xx: Use proper SSP header in soc/pxa/ssp.cThere is nothing from pxa2xx_spi.h used by soc/pxa/ssp.c.Replace it with pxa2xx_ssp.h.Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>Acked-by: Arnd Bergmann <arnd@arndb.de>Link: https://msgid.link/r/20240307195056.4059864-4-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
soc: pxa: ssp: fix castsOn ARM64 platforms, id->data is a 64-bit value and casting it to a32-bit integer causes build errors. Cast it to uintptr_t instead.The id->driver_data cast is unnecessary
soc: pxa: ssp: fix castsOn ARM64 platforms, id->data is a 64-bit value and casting it to a32-bit integer causes build errors. Cast it to uintptr_t instead.The id->driver_data cast is unnecessary, so drop it.Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>Link: https://lore.kernel.org/r/20240106-pxa-ssp-v2-1-69ac9f028bba@skole.hrSigned-off-by: Arnd Bergmann <arnd@arndb.de>
soc/pxa: ssp: Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possible to do error
soc/pxa: ssp: Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possible to do error handling byreturning an error code. However the value returned is ignored (apartfrom emitting a warning) and this typically results in resource leaks.To improve here there is a quest to make the remove callback returnvoid. In the first step of this quest all drivers are converted to.remove_new() which already returns void. Eventually after all driversare converted, .remove_new() will be renamed to .remove().Trivially convert this driver from always returning zero in the removecallback to the void returning variant.Link: https://lore.kernel.org/r/20230925095532.1984344-18-u.kleine-koenig@pengutronix.deSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
pxa: Remove dev_err() after platform_get_irq()There is no need to call the dev_err() function directly to print acustom message when handling an error from either the platform_get_irq()or platfor
pxa: Remove dev_err() after platform_get_irq()There is no need to call the dev_err() function directly to print acustom message when handling an error from either the platform_get_irq()or platform_get_irq_byname() functions as both are going to display anappropriate error message in case of a failure.Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>Link: https://lore.kernel.org/r/202212021042043546303@zte.com.cnSigned-off-by: Arnd Bergmann <arnd@arndb.de>
pxa: Drop if with an always false conditionThe remove callback is only called after probe completed successfully.In this case platform_set_drvdata() was called with a non-NULL argumentand so ssp
pxa: Drop if with an always false conditionThe remove callback is only called after probe completed successfully.In this case platform_set_drvdata() was called with a non-NULL argumentand so ssp is never NULL.Also note that returning an error code from a remove callback doesn'tresult in the device staying bound. It's still removed and devmcallbacks are called. So the memory that ssp pointed to during probe,goes away without the node being removed from ssp_list. The probableresult of an early exit is accessing freed memory when the list iswalked the next time.Signed-off-by: Uwe Kleine-König <(address hidden)>Signed-off-by: Arnd Bergmann <arnd@arndb.de>
ARM: pxa: move plat-pxa to drivers/soc/There are two drivers in arch/arm/plat-pxa: mfp and ssp. Bothof them should ideally not be needed at all, as there areproper subsystems to replace them.OT
ARM: pxa: move plat-pxa to drivers/soc/There are two drivers in arch/arm/plat-pxa: mfp and ssp. Bothof them should ideally not be needed at all, as there areproper subsystems to replace them.OTOH, they are self-contained and can simply be normalSoC drivers, so move them over there to eliminate one moreof the plat-* directories.Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> (mach-pxa)Acked-by: Lubomir Rintel <lkundrak@v3.sk> (mach-mmp)Signed-off-by: Arnd Bergmann <arnd@arndb.de>