* [PATCH] mmc: meson-gx: remove meson_mmc_get_cd
@ 2023-02-12 21:43 Heiner Kallweit
2023-02-14 12:18 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2023-02-12 21:43 UTC (permalink / raw)
To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
open list:ARM/Amlogic Meson...
MMC core only checks whether return value of .get_cd() equals zero.
Therefore -ENOSYS and 1 are effectively the same and the function
can be removed.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/mmc/host/meson-gx-mmc.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 6d5caf233..1d761f33d 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -1064,20 +1064,6 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id)
return IRQ_HANDLED;
}
-/*
- * NOTE: we only need this until the GPIO/pinctrl driver can handle
- * interrupts. For now, the MMC core will use this for polling.
- */
-static int meson_mmc_get_cd(struct mmc_host *mmc)
-{
- int status = mmc_gpio_get_cd(mmc);
-
- if (status == -ENOSYS)
- return 1; /* assume present */
-
- return status;
-}
-
static void meson_mmc_cfg_init(struct meson_host *host)
{
u32 cfg = 0;
@@ -1146,7 +1132,7 @@ static void meson_mmc_ack_sdio_irq(struct mmc_host *mmc)
static const struct mmc_host_ops meson_mmc_ops = {
.request = meson_mmc_request,
.set_ios = meson_mmc_set_ios,
- .get_cd = meson_mmc_get_cd,
+ .get_cd = mmc_gpio_get_cd,
.pre_req = meson_mmc_pre_req,
.post_req = meson_mmc_post_req,
.execute_tuning = meson_mmc_resampling_tuning,
--
2.39.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: meson-gx: remove meson_mmc_get_cd
2023-02-12 21:43 [PATCH] mmc: meson-gx: remove meson_mmc_get_cd Heiner Kallweit
@ 2023-02-14 12:18 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2023-02-14 12:18 UTC (permalink / raw)
To: Heiner Kallweit
Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
open list:ARM/Amlogic Meson...
On Sun, 12 Feb 2023 at 22:54, Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> MMC core only checks whether return value of .get_cd() equals zero.
> Therefore -ENOSYS and 1 are effectively the same and the function
> can be removed.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/meson-gx-mmc.c | 16 +---------------
> 1 file changed, 1 insertion(+), 15 deletions(-)
>
> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index 6d5caf233..1d761f33d 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -1064,20 +1064,6 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> -/*
> - * NOTE: we only need this until the GPIO/pinctrl driver can handle
> - * interrupts. For now, the MMC core will use this for polling.
> - */
> -static int meson_mmc_get_cd(struct mmc_host *mmc)
> -{
> - int status = mmc_gpio_get_cd(mmc);
> -
> - if (status == -ENOSYS)
> - return 1; /* assume present */
> -
> - return status;
> -}
> -
> static void meson_mmc_cfg_init(struct meson_host *host)
> {
> u32 cfg = 0;
> @@ -1146,7 +1132,7 @@ static void meson_mmc_ack_sdio_irq(struct mmc_host *mmc)
> static const struct mmc_host_ops meson_mmc_ops = {
> .request = meson_mmc_request,
> .set_ios = meson_mmc_set_ios,
> - .get_cd = meson_mmc_get_cd,
> + .get_cd = mmc_gpio_get_cd,
> .pre_req = meson_mmc_pre_req,
> .post_req = meson_mmc_post_req,
> .execute_tuning = meson_mmc_resampling_tuning,
> --
> 2.39.1
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-14 12:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-12 21:43 [PATCH] mmc: meson-gx: remove meson_mmc_get_cd Heiner Kallweit
2023-02-14 12:18 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox