]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: arm_pl180_mmci: Remove cd_inverted host's struct field
authorPatrice Chotard <patrice.chotard@st.com>
Wed, 25 Jul 2018 15:49:09 +0000 (17:49 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 3 Aug 2018 23:53:54 +0000 (19:53 -0400)
As platform uses GPIOs for card detection, it's
simpler and more readable to use GPIO_ACTIVE_(LOW|HIGH)
in the gpio flags instead of using the cd-inverted
property.

Reported-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
drivers/mmc/arm_pl180_mmci.c
drivers/mmc/arm_pl180_mmci.h

index 1cd780b3eec0108c6c9ccb339abd71be82a7bf4c..f71d79ecd6bae01bfa93700b42380d504da3b01e 100644 (file)
@@ -499,11 +499,8 @@ static int dm_mmc_getcd(struct udevice *dev)
        struct pl180_mmc_host *host = dev->priv;
        int value = 1;
 
-       if (dm_gpio_is_valid(&host->cd_gpio)) {
+       if (dm_gpio_is_valid(&host->cd_gpio))
                value = dm_gpio_get_value(&host->cd_gpio);
-               if (host->cd_inverted)
-                       return !value;
-       }
 
        return value;
 }
index 6b98db6cd978d6c407102064f68a5a9dd4b1a82e..36487be288b2887a3b389a343731b7bbe095bf4a 100644 (file)
@@ -192,7 +192,6 @@ struct pl180_mmc_host {
        struct mmc_config cfg;
 #ifdef CONFIG_DM_MMC
        struct gpio_desc cd_gpio;
-       bool cd_inverted;
 #endif
 };