diff mbox

mmc: pxamci: fix again read-only gpio detection polarity

Message ID 1454023286-25832-1-git-send-email-robert.jarzmik@free.fr (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Jarzmik Jan. 28, 2016, 11:21 p.m. UTC
The commit fixing the conversion of pxamci to slot-gpio API fixed the
inverted the logic of the read-only gpio. Unfortunately, the commit was
tested on a non-inverted gpio, and not on the inverted one. And the fix
did work partially, by luck.

This is the remaining missing part of the fix, trivial but still necessary.

Fixes: Fixes: 26d49fe71953 ("mmc: pxamci: fix read-only gpio detection polarity")
Reported-by: Andrea Adami <andrea.adami@gmail.com>
Tested-by: Andrea Adami <andrea.adami@gmail.com>
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(-)

Comments

Ulf Hansson Feb. 2, 2016, 1:11 p.m. UTC | #1
On 29 January 2016 at 00:21, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> The commit fixing the conversion of pxamci to slot-gpio API fixed the
> inverted the logic of the read-only gpio. Unfortunately, the commit was
> tested on a non-inverted gpio, and not on the inverted one. And the fix
> did work partially, by luck.
>
> This is the remaining missing part of the fix, trivial but still necessary.
>
> Fixes: Fixes: 26d49fe71953 ("mmc: pxamci: fix read-only gpio detection polarity")
> Reported-by: Andrea Adami <andrea.adami@gmail.com>
> Tested-by: Andrea Adami <andrea.adami@gmail.com>
> 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 ce08896b9d69..28a057fae0a1 100644
> --- a/drivers/mmc/host/pxamci.c
> +++ b/drivers/mmc/host/pxamci.c
> @@ -804,7 +804,7 @@ static int pxamci_probe(struct platform_device *pdev)
>                 dev_err(&pdev->dev, "Failed requesting gpio_ro %d\n", gpio_ro);
>                 goto out;
>         } else {
> -               mmc->caps |= host->pdata->gpio_card_ro_invert ?
> +               mmc->caps2 |= host->pdata->gpio_card_ro_invert ?
>                         0 : MMC_CAP2_RO_ACTIVE_HIGH;
>         }
>
> --
> 2.1.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index ce08896b9d69..28a057fae0a1 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -804,7 +804,7 @@  static int pxamci_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "Failed requesting gpio_ro %d\n", gpio_ro);
 		goto out;
 	} else {
-		mmc->caps |= host->pdata->gpio_card_ro_invert ?
+		mmc->caps2 |= host->pdata->gpio_card_ro_invert ?
 			0 : MMC_CAP2_RO_ACTIVE_HIGH;
 	}