linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: pxamci: fix read-only gpio detection polarity
@ 2015-11-05 19:46 Robert Jarzmik
  2015-11-06  9:08 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Jarzmik @ 2015-11-05 19:46 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-mmc, linux-kernel, Robert Jarzmik, stable

The commit converting pxamci to slot-gpio API inverted the logic of the
read-only gpio. Fix it by inverting the logic again.

Fixes: fd546ee6a7dc ("mmc: pxamci: fix card detect with slot-gpio API")
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: stable@vger.kernel.org
---
 drivers/mmc/host/pxamci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 8cadd74e8407..ce08896b9d69 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -805,7 +805,7 @@ static int pxamci_probe(struct platform_device *pdev)
 		goto out;
 	} else {
 		mmc->caps |= host->pdata->gpio_card_ro_invert ?
-			MMC_CAP2_RO_ACTIVE_HIGH : 0;
+			0 : MMC_CAP2_RO_ACTIVE_HIGH;
 	}
 
 	if (gpio_is_valid(gpio_cd))
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mmc: pxamci: fix read-only gpio detection polarity
  2015-11-05 19:46 [PATCH] mmc: pxamci: fix read-only gpio detection polarity Robert Jarzmik
@ 2015-11-06  9:08 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2015-11-06  9:08 UTC (permalink / raw)
  To: Robert Jarzmik; +Cc: linux-mmc, linux-kernel, # 4.0+

On 5 November 2015 at 20:46, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> The commit converting pxamci to slot-gpio API inverted the logic of the
> read-only gpio. Fix it by inverting the logic again.
>
> Fixes: fd546ee6a7dc ("mmc: pxamci: fix card detect with slot-gpio API")
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: stable@vger.kernel.org

Thanks, applied for fixes!

Kind regards
Uffe

> ---
>  drivers/mmc/host/pxamci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
> index 8cadd74e8407..ce08896b9d69 100644
> --- a/drivers/mmc/host/pxamci.c
> +++ b/drivers/mmc/host/pxamci.c
> @@ -805,7 +805,7 @@ static int pxamci_probe(struct platform_device *pdev)
>                 goto out;
>         } else {
>                 mmc->caps |= host->pdata->gpio_card_ro_invert ?
> -                       MMC_CAP2_RO_ACTIVE_HIGH : 0;
> +                       0 : MMC_CAP2_RO_ACTIVE_HIGH;
>         }
>
>         if (gpio_is_valid(gpio_cd))
> --
> 2.1.4
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-06  9:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-05 19:46 [PATCH] mmc: pxamci: fix read-only gpio detection polarity Robert Jarzmik
2015-11-06  9:08 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).