spi: bcm-qspi: Make bcm_qspi_remove() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 17 Oct 2022 20:01:43 +0000 (22:01 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 18 Oct 2022 18:16:53 +0000 (19:16 +0100)
The function bcm_qspi_remove() returns zero unconditionally. Make it
return void.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20221017200143.1426528-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcm-qspi.c
drivers/spi/spi-bcm-qspi.h
drivers/spi/spi-brcmstb-qspi.c
drivers/spi/spi-iproc-qspi.c

index cad2d55dcd3d2b7c05642461a2fe8f23fbae28f9..0eee574d3e1f20635ad9ed9726c6339dc1616e8f 100644 (file)
@@ -1682,7 +1682,7 @@ qspi_probe_err:
 /* probe function to be called by SoC specific platform driver probe */
 EXPORT_SYMBOL_GPL(bcm_qspi_probe);
 
-int bcm_qspi_remove(struct platform_device *pdev)
+void bcm_qspi_remove(struct platform_device *pdev)
 {
        struct bcm_qspi *qspi = platform_get_drvdata(pdev);
 
@@ -1690,9 +1690,8 @@ int bcm_qspi_remove(struct platform_device *pdev)
        bcm_qspi_hw_uninit(qspi);
        clk_disable_unprepare(qspi->clk);
        kfree(qspi->dev_ids);
-
-       return 0;
 }
+
 /* function to be called by SoC specific platform driver remove() */
 EXPORT_SYMBOL_GPL(bcm_qspi_remove);
 
index 01aec646010842f2ec8ac6bcc168896f16d2d87c..3d7c359c0239be6eb307ec39ade1bc6cdccfc2b3 100644 (file)
@@ -96,7 +96,7 @@ static inline u32 get_qspi_mask(int type)
 /* The common driver functions to be called by the SoC platform driver */
 int bcm_qspi_probe(struct platform_device *pdev,
                   struct bcm_qspi_soc_intc *soc_intc);
-int bcm_qspi_remove(struct platform_device *pdev);
+void bcm_qspi_remove(struct platform_device *pdev);
 
 /* pm_ops used by the SoC platform driver called on PM suspend/resume */
 extern const struct dev_pm_ops bcm_qspi_pm_ops;
index 75e9b76dab1e0d2bd0806d75ca0079e0c36cd54f..de362b35718f8c2daf771cd6bb90239958f7f28b 100644 (file)
@@ -23,7 +23,9 @@ static int brcmstb_qspi_probe(struct platform_device *pdev)
 
 static int brcmstb_qspi_remove(struct platform_device *pdev)
 {
-       return bcm_qspi_remove(pdev);
+       bcm_qspi_remove(pdev);
+
+       return 0;
 }
 
 static struct platform_driver brcmstb_qspi_driver = {
index de297dacfd570a25e7d2169cb66b16021a694c1a..91cf8eb7213c3377f1447faff7254630fb8abe91 100644 (file)
@@ -129,7 +129,9 @@ static int bcm_iproc_probe(struct platform_device *pdev)
 
 static int bcm_iproc_remove(struct platform_device *pdev)
 {
-       return bcm_qspi_remove(pdev);
+       bcm_qspi_remove(pdev);
+
+       return 0;
 }
 
 static const struct of_device_id bcm_iproc_of_match[] = {