OSDN Git Service

tomoyo/tomoyo-test1.git
11 months agommc: core: Add host specific tuning support for SD HS mode
Wenchao Chen [Fri, 25 Aug 2023 09:17:42 +0000 (17:17 +0800)]
mmc: core: Add host specific tuning support for SD HS mode

To support the need for host specific tuning for SD high-speed mode, let's
add two new optional callbacks, ->prepare|execute_sd_hs_tuning() and let's
call them when switching into the SD high-speed mode.

Note that, during the tuning process it's also needed for host drivers to
send commands to the SD card to verify that the tuning process succeeds.
Therefore, let's also share the corresponding functions from the core to
allow this.

Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
Link: https://lore.kernel.org/r/20230825091743.15613-2-wenchao.chen@unisoc.com
[Ulf: Dropped unnecessary function declarations and updated the commit msg]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-dwcmshc: Add runtime PM operations
Liming Sun [Tue, 22 Aug 2023 19:59:29 +0000 (15:59 -0400)]
mmc: sdhci-of-dwcmshc: Add runtime PM operations

This commit implements the runtime PM operations to disable eMMC card clock
when idle.

Reviewed-by: David Thompson <davthompson@nvidia.com>
Signed-off-by: Liming Sun <limings@nvidia.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230822195929.168552-2-limings@nvidia.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-dwcmshc: Add error handling in dwcmshc_resume
Liming Sun [Tue, 22 Aug 2023 19:59:28 +0000 (15:59 -0400)]
mmc: sdhci-of-dwcmshc: Add error handling in dwcmshc_resume

This commit adds handling in dwcmshc_resume() for different error
cases.

Signed-off-by: Liming Sun <limings@nvidia.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230822195929.168552-1-limings@nvidia.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450
Giulio Benetti [Fri, 11 Aug 2023 21:48:53 +0000 (23:48 +0200)]
mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450

Errata ERR010450 only shows up if voltage is 1.8V, but if the device is
supplied by 3v3 the errata can be ignored. So let's check for if quirk
SDHCI_QUIRK2_NO_1_8_V is defined or not before limiting the frequency.

Cc: Jim Reinhart <jimr@tekvox.com>
Cc: James Autry <jautry@tekvox.com>
Cc: Matthew Maron <matthewm@tekvox.com>
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Acked-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230811214853.8623-1-giulio.benetti@benettiengineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pltfm: Rename sdhci_pltfm_register()
Adrian Hunter [Fri, 11 Aug 2023 13:03:51 +0000 (16:03 +0300)]
mmc: sdhci-pltfm: Rename sdhci_pltfm_register()

Now that sdhci_pltfm_unregister() has been removed, rename
sdhci_pltfm_register() to sdhci_pltfm_init_and_add_host() to better
reflect what it does.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-17-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pltfm: Remove sdhci_pltfm_unregister()
Adrian Hunter [Fri, 11 Aug 2023 13:03:50 +0000 (16:03 +0300)]
mmc: sdhci-pltfm: Remove sdhci_pltfm_unregister()

Now that sdhci_pltfm_unregister() is unused, remove it.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-16-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-st: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:49 +0000 (16:03 +0300)]
mmc: sdhci-st: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because
sdhci_pltfm_unregister() is going to be removed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-15-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pxav2: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:48 +0000 (16:03 +0300)]
mmc: sdhci-pxav2: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that
devm_clk_get_enabled() can be used for pltfm_host->clk.

This has the side effect that the order of operations on the error path
and remove path is not the same as it was before, but should be safe
nevertheless.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-14-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-sparx5: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:47 +0000 (16:03 +0300)]
mmc: sdhci-of-sparx5: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that
devm_clk_get_enabled() can be used for pltfm_host->clk.

This has the side effect that the order of operations on the error path
and remove path is not the same as it was before, but should be safe
nevertheless.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-13-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-hlwd: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:46 +0000 (16:03 +0300)]
mmc: sdhci-of-hlwd: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because
sdhci_pltfm_unregister() is going to be removed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-12-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-esdhc: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:45 +0000 (16:03 +0300)]
mmc: sdhci-of-esdhc: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because
sdhci_pltfm_unregister() is going to be removed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-11-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-at91: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:44 +0000 (16:03 +0300)]
mmc: sdhci-of-at91: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because
sdhci_pltfm_unregister() is going to be removed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-10-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-arasan: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:43 +0000 (16:03 +0300)]
mmc: sdhci-of-arasan: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because
sdhci_pltfm_unregister() is going to be removed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-9-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-iproc: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:42 +0000 (16:03 +0300)]
mmc: sdhci-iproc: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that
devm_clk_get_enabled() can be used for pltfm_host->clk.

This has the side effect that the order of operations on the error path
and remove path is not the same as it was before, but should be safe
nevertheless.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-8-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci_f_sdh30: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:41 +0000 (16:03 +0300)]
mmc: sdhci_f_sdh30: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because
sdhci_pltfm_unregister() is going to be removed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-7-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-dove: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:40 +0000 (16:03 +0300)]
mmc: sdhci-dove: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that
devm_clk_get_enabled() can be used for pltfm_host->clk.

This has the side effect that the order of operations on the error path
and remove path is not the same as it was before, but should be safe
nevertheless.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-6-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-cadence: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:39 +0000 (16:03 +0300)]
mmc: sdhci-cadence: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that
devm_clk_get_enabled() can be used for pltfm_host->clk.

This has the side effect that the order of operations on the error path
and remove path is not the same as it was before, but should be safe
nevertheless.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-5-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-brcmstb: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:38 +0000 (16:03 +0300)]
mmc: sdhci-brcmstb: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that
devm_clk_get_optional_enabled() can be used for pltfm_host->clk.

This has the side effect that the order of operations on the error path
and remove path is not the same as it was before, but should be safe
nevertheless.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-4-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-bcm-kona: Use sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:37 +0000 (16:03 +0300)]
mmc: sdhci-bcm-kona: Use sdhci_pltfm_remove()

Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because
sdhci_pltfm_unregister() is going to be removed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-3-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pltfm: Add sdhci_pltfm_remove()
Adrian Hunter [Fri, 11 Aug 2023 13:03:36 +0000 (16:03 +0300)]
mmc: sdhci-pltfm: Add sdhci_pltfm_remove()

Add sdhci_pltfm_remove() to replace sdhci_pltfm_unregister().
The difference is that sdhci_pltfm_remove() does not do:
clk_disable_unprepare(pltfm_host->clk);
which allows drivers to choose to use devm_clk_get_enabled() or
similar, for pltfm_host->clk.

Once all drivers using sdhci_pltfm_unregister() have been amended to use
sdhci_pltfm_remove() instead, sdhci_pltfm_unregister() will be removed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230811130351.7038-2-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: f-sdh30: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:50 +0000 (15:00 +0800)]
mmc: f-sdh30: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-61-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: Merge branch fixes into next
Ulf Hansson [Tue, 15 Aug 2023 11:28:18 +0000 (13:28 +0200)]
mmc: Merge branch fixes into next

Merge the mmc fixes for v6.5-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.6.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: f-sdh30: fix order of function calls in sdhci_f_sdh30_remove
Yangtao Li [Thu, 27 Jul 2023 07:00:51 +0000 (15:00 +0800)]
mmc: f-sdh30: fix order of function calls in sdhci_f_sdh30_remove

The order of function calls in sdhci_f_sdh30_remove is wrong,
let's call sdhci_pltfm_unregister first.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fixes: 5def5c1c15bf ("mmc: sdhci-f-sdh30: Replace with sdhci_pltfm")
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230727070051.17778-62-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci_am654: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:49 +0000 (15:00 +0800)]
mmc: sdhci_am654: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-60-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci_am654: Properly handle failures in .remove()
Yangtao Li [Thu, 27 Jul 2023 07:00:48 +0000 (15:00 +0800)]
mmc: sdhci_am654: Properly handle failures in .remove()

Returning an error code in a platform driver's remove function is wrong
most of the time and there is an effort to make the callback return
void. To prepare this rework the function not to exit early.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-59-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: uniphier-sd: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:47 +0000 (15:00 +0800)]
mmc: uniphier-sd: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-58-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:46 +0000 (15:00 +0800)]
mmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> # Broadcom
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-57-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: renesas_sdhi: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:45 +0000 (15:00 +0800)]
mmc: renesas_sdhi: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230727070051.17778-56-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: pwrseq: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:44 +0000 (15:00 +0800)]
mmc: pwrseq: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-55-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: pwrseq: sd8787: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:43 +0000 (15:00 +0800)]
mmc: pwrseq: sd8787: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-54-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: pwrseq_simple: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:42 +0000 (15:00 +0800)]
mmc: pwrseq_simple: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-53-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: mvsdio: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:41 +0000 (15:00 +0800)]
mmc: mvsdio: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-52-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: mxcmmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:40 +0000 (15:00 +0800)]
mmc: mxcmmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-51-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-spear: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:39 +0000 (15:00 +0800)]
mmc: sdhci-spear: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-50-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sunplus-mmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:38 +0000 (15:00 +0800)]
mmc: sunplus-mmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-49-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-esdhc-mcf: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:37 +0000 (15:00 +0800)]
mmc: sdhci-esdhc-mcf: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Angelo Dureghello <angelo.dureghello@timesys.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-48-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: wmt-sdmmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:36 +0000 (15:00 +0800)]
mmc: wmt-sdmmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-47-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-st: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:35 +0000 (15:00 +0800)]
mmc: sdhci-st: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-46-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: atmel-mci: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:34 +0000 (15:00 +0800)]
mmc: atmel-mci: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Link: https://lore.kernel.org/r/20230727070051.17778-45-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: usdhi60rol0: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:33 +0000 (15:00 +0800)]
mmc: usdhi60rol0: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Link: https://lore.kernel.org/r/20230727070051.17778-44-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: wbsd: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:32 +0000 (15:00 +0800)]
mmc: wbsd: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-43-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: owl: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:31 +0000 (15:00 +0800)]
mmc: owl: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-42-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: dw_mmc: rockchip: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:30 +0000 (15:00 +0800)]
mmc: dw_mmc: rockchip: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20230727070051.17778-41-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: alcor: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:29 +0000 (15:00 +0800)]
mmc: alcor: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-40-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-msm: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:28 +0000 (15:00 +0800)]
mmc: sdhci-msm: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-39-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-esdhc-imx: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:27 +0000 (15:00 +0800)]
mmc: sdhci-esdhc-imx: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-38-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-acpi: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:26 +0000 (15:00 +0800)]
mmc: sdhci-acpi: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-37-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-tegra: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:25 +0000 (15:00 +0800)]
mmc: sdhci-tegra: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-36-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-sprd: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:24 +0000 (15:00 +0800)]
mmc: sdhci-sprd: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-35-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: meson-mx-sdio: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:23 +0000 (15:00 +0800)]
mmc: meson-mx-sdio: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-34-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-aspeed: Convert to platform remove
Yangtao Li [Thu, 27 Jul 2023 07:00:22 +0000 (15:00 +0800)]
mmc: sdhci-of-aspeed: Convert to platform remove

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-33-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-aspeed: remove unneeded variables
Yangtao Li [Thu, 27 Jul 2023 07:00:21 +0000 (15:00 +0800)]
mmc: sdhci-of-aspeed: remove unneeded variables

The variable 'dead' is redundant, let's remove it.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230727070051.17778-32-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-omap: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:20 +0000 (15:00 +0800)]
mmc: sdhci-omap: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-31-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: moxart: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:19 +0000 (15:00 +0800)]
mmc: moxart: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-30-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: pxamci: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:18 +0000 (15:00 +0800)]
mmc: pxamci: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-29-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: cavium-octeon: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:17 +0000 (15:00 +0800)]
mmc: cavium-octeon: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-28-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: au1xmmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:16 +0000 (15:00 +0800)]
mmc: au1xmmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-27-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-dwcmshc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:15 +0000 (15:00 +0800)]
mmc: sdhci-of-dwcmshc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-26-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-arasan: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:14 +0000 (15:00 +0800)]
mmc: sdhci-of-arasan: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20230727070051.17778-25-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: mxs-mmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:13 +0000 (15:00 +0800)]
mmc: mxs-mmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-24-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: rtsx_usb_sdmmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:12 +0000 (15:00 +0800)]
mmc: rtsx_usb_sdmmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-23-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: meson-mx-sdhc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:11 +0000 (15:00 +0800)]
mmc: meson-mx-sdhc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-22-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-s3c: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:10 +0000 (15:00 +0800)]
mmc: sdhci-s3c: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20230727070051.17778-21-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: xenon: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:09 +0000 (15:00 +0800)]
mmc: xenon: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-20-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: meson-gx: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:08 +0000 (15:00 +0800)]
mmc: meson-gx: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-19-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sh_mmcif: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:07 +0000 (15:00 +0800)]
mmc: sh_mmcif: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-18-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: rtsx_pci: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:06 +0000 (15:00 +0800)]
mmc: rtsx_pci: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-17-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: rtsx_pci: Drop if block with always false condition
Yangtao Li [Thu, 27 Jul 2023 07:00:05 +0000 (15:00 +0800)]
mmc: rtsx_pci: Drop if block with always false condition

rtsx_pci_sdmmc_drv_remove() is only called for a device after
rtsx_pci_sdmmc_drv_probe() returned 0. In that case platform_set_drvdata()
was called with a non-NULL value and so platform_get_drvdata()
won't return NULL.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230727070051.17778-16-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pxav3: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:04 +0000 (15:00 +0800)]
mmc: sdhci-pxav3: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-15-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: dw_mmc: exynos: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:03 +0000 (15:00 +0800)]
mmc: dw_mmc: exynos: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-14-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: omap: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:02 +0000 (15:00 +0800)]
mmc: omap: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-13-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-at91: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:01 +0000 (15:00 +0800)]
mmc: sdhci-of-at91: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Link: https://lore.kernel.org/r/20230727070051.17778-12-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: omap_hsmmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:00 +0000 (15:00 +0800)]
mmc: omap_hsmmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-11-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci: milbeaut: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:59 +0000 (14:59 +0800)]
mmc: sdhci: milbeaut: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-10-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pic32: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:58 +0000 (14:59 +0800)]
mmc: sdhci-pic32: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-9-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: dw_mmc: hi3798cv200: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:57 +0000 (14:59 +0800)]
mmc: dw_mmc: hi3798cv200: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-8-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: davinci_mmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:56 +0000 (14:59 +0800)]
mmc: davinci_mmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-7-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: cb710: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:55 +0000 (14:59 +0800)]
mmc: cb710: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Link: https://lore.kernel.org/r/20230727070051.17778-6-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: mtk-sd: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:54 +0000 (14:59 +0800)]
mmc: mtk-sd: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230727070051.17778-5-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: litex_mmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:53 +0000 (14:59 +0800)]
mmc: litex_mmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Gabriel Somlo <gsomlo@gmail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-4-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: jz4740: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:52 +0000 (14:59 +0800)]
mmc: jz4740: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20230727070051.17778-3-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: bcm2835: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:51 +0000 (14:59 +0800)]
mmc: bcm2835: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20230727070051.17778-2-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sunxi: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:50 +0000 (14:59 +0800)]
mmc: sunxi: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-1-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: core: Cleanup mmc_sd_num_wr_blocks() function
Victor Shih [Fri, 11 Aug 2023 10:14:04 +0000 (18:14 +0800)]
mmc: core: Cleanup mmc_sd_num_wr_blocks() function

Use mmc_app_cmd() to avoid open-coding in mmc_sd_num_wr_blocks().

Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Link: https://lore.kernel.org/r/20230811101404.4463-1-victorshihgli@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pci-o2micro: add Bayhub new chip GG8 support for express card
Chevron Li [Fri, 11 Aug 2023 03:35:17 +0000 (11:35 +0800)]
mmc: sdhci-pci-o2micro: add Bayhub new chip GG8 support for express card

Add Bayhub new chip GG8 support for SD express card.
This patch depends on patch 1/2.

Signed-off-by: Chevron Li <chevron.li@bayhubtech.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230811033517.11532-2-chevron_li@126.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pci-o2micro: add Bayhub new chip GG8 support for UHS-I
Chevron Li [Fri, 11 Aug 2023 03:35:16 +0000 (11:35 +0800)]
mmc: sdhci-pci-o2micro: add Bayhub new chip GG8 support for UHS-I

Add Bayhub new chip GG8 support for UHS-I function

Signed-off-by: Chevron Li <chevron.li@bayhubtech.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230811033517.11532-1-chevron_li@126.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agodt-bindings: mmc: Fix reference to pwr-seq-simple
Guido Günther [Wed, 9 Aug 2023 18:50:11 +0000 (20:50 +0200)]
dt-bindings: mmc: Fix reference to pwr-seq-simple

It's a YAML file nowadays.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Link: https://lore.kernel.org/r/d7a0be6a2688a9829077cc21ca4a5bf9528f9eb1.1691606520.git.agx@sigxcpu.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: remove unnecessary set_drvdata() function
Yang Yingliang [Tue, 8 Aug 2023 12:15:13 +0000 (20:15 +0800)]
mmc: remove unnecessary set_drvdata() function

The driver data will be cleared in device_unbind_cleanup() in driver
core code. So the set_drvdata(..., NULL) called in remove and error
path in probe can be removed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230808121513.553143-1-yangyingliang@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sunplus: Fix platform_get_irq() error checking
Harshit Mogalapalli [Wed, 9 Aug 2023 07:18:12 +0000 (00:18 -0700)]
mmc: sunplus: Fix platform_get_irq() error checking

The platform_get_irq() function returns negative error codes on failure.

Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20230809071812.547229-2-harshit.m.mogalapalli@oracle.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: Merge branch fixes into next
Ulf Hansson [Wed, 9 Aug 2023 13:39:50 +0000 (15:39 +0200)]
mmc: Merge branch fixes into next

Merge the mmc fixes for v6.5-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.6.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci: milbeaut: remove redundant of_match_ptr()
Zhu Wang [Tue, 8 Aug 2023 13:37:14 +0000 (21:37 +0800)]
mmc: sdhci: milbeaut: remove redundant of_match_ptr()

The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr() here. We remove of_match_ptr() here.

Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Link: https://lore.kernel.org/r/20230808133714.214914-3-wangzhu9@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-spear: remove redundant of_match_ptr()
Zhu Wang [Tue, 8 Aug 2023 13:37:13 +0000 (21:37 +0800)]
mmc: sdhci-spear: remove redundant of_match_ptr()

The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr() here. We remove both CONFIG_OF and of_match_ptr() here.

Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Link: https://lore.kernel.org/r/20230808133714.214914-2-wangzhu9@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agodt-bindings: mmc: arasan,sdci: Add power-domains and iommus properties
Michal Simek [Thu, 3 Aug 2023 07:22:56 +0000 (09:22 +0200)]
dt-bindings: mmc: arasan,sdci: Add power-domains and iommus properties

ZynqMP SDHCI Arasan IP core has own power domain and also iommu ID that's
why describe optional power-domains and iommus properties.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/bf912d5f5e74b43903a84262565f564bfe0fed7e.1691047370.git.michal.simek@amd.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-st: Use devm_platform_ioremap_resource_byname()
Li Zetao [Wed, 2 Aug 2023 09:40:28 +0000 (17:40 +0800)]
mmc: sdhci-st: Use devm_platform_ioremap_resource_byname()

Convert platform_get_resource_byname() + devm_ioremap_resource() to a
single call to devm_platform_ioremap_resource_byname(), as this is
exactly what this function does.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230802094028.976612-1-lizetao1@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agodt-bindings: sdhci-of-at91: add microchip,sam9x7-sdhci
Varshini Rajendran [Fri, 28 Jul 2023 10:26:16 +0000 (15:56 +0530)]
dt-bindings: sdhci-of-at91: add microchip,sam9x7-sdhci

Add microchip,sam9x7-sdhci to DT bindings documentation.

Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230728102616.266235-1-varshini.rajendran@microchip.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: core: propagate removable attribute to driver core
Thomas Weißschuh [Tue, 25 Jul 2023 14:17:25 +0000 (16:17 +0200)]
mmc: core: propagate removable attribute to driver core

Userspace can use this to distinguish hotpluggable mmc devices such as
sdcards from non-hotpluggable ones such as eMMC.
One example is the lsblk tool from util-linux.

Note that dev_set_removable() is not related to GENHD_FL_REMOVABLE which
is not applicable as per the comment in drivers/mmc/core/block.c

Link: https://github.com/util-linux/util-linux/issues/2379
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20230725-mmc-removable-v1-1-b2e0c4f18e6d@weissschuh.net
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: Explicitly include correct DT includes
Rob Herring [Tue, 18 Jul 2023 14:30:52 +0000 (08:30 -0600)]
mmc: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230718143054.1065288-1-robh@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: uniphier-sd: register irqs before registering controller
Wolfram Sang [Wed, 12 Jul 2023 14:13:27 +0000 (16:13 +0200)]
mmc: uniphier-sd: register irqs before registering controller

IRQs should be ready to serve when we call mmc_add_host() via
tmio_mmc_host_probe(). To achieve that, ensure that all irqs are masked
before registering the handlers.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20230712141327.20827-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: davinci: Make SDIO irq truly optional
Julien Delbergue [Thu, 13 Jul 2023 09:31:08 +0000 (11:31 +0200)]
mmc: davinci: Make SDIO irq truly optional

The following error is printed on Logic PD's DA850 EVM:
  davinci_mmc 1c40000.mmc: error -ENXIO: IRQ index 1 not found

Depending on the board, the SDIO interrupt may not be present, so use
the correct function to reflect that and prevent logging an error.

Signed-off-by: Julien Delbergue <j.delbergue.foss@gmail.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/8b57db8d-1d3a-883e-eb8f-ddf15f19d823@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: pxamci: Use devm_platform_get_and_ioremap_resource()
Yangtao Li [Tue, 4 Jul 2023 13:19:38 +0000 (21:19 +0800)]
mmc: pxamci: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230704131939.22562-3-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>