]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Fix mmc_set_power GPIO usage
authorLadislav Michl <ladis@linux-mips.org>
Mon, 23 Mar 2009 18:37:21 +0000 (11:37 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 23 Mar 2009 18:37:21 +0000 (11:37 -0700)
Simple simplification...

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/board-h3-mmc.c
arch/arm/mach-omap1/board-nokia770.c

index fdfe793d56f2893e61d025ab63113846dc3ef51c..d7f40f934514e673591a0768dd56e115413659c1 100644 (file)
 static int mmc_set_power(struct device *dev, int slot, int power_on,
                                int vdd)
 {
-       if (power_on)
-               gpio_direction_output(H3_TPS_GPIO_MMC_PWR_EN, 1);
-       else
-               gpio_direction_output(H3_TPS_GPIO_MMC_PWR_EN, 0);
-
+       gpio_set_value(H3_TPS_GPIO_MMC_PWR_EN, power_on);
        return 0;
 }
 
index 0b47a9bc63bcc4ef6022c0032d44322d8f89ca9a..8780ca66639832b0fe54749aae4a21ab103eeb62 100644 (file)
@@ -182,11 +182,7 @@ static struct omap_usb_config nokia770_usb_config __initdata = {
 static int nokia770_mmc_set_power(struct device *dev, int slot, int power_on,
                                int vdd)
 {
-       if (power_on)
-               gpio_set_value(NOKIA770_GPIO_MMC_POWER, 1);
-       else
-               gpio_set_value(NOKIA770_GPIO_MMC_POWER, 0);
-
+       gpio_set_value(NOKIA770_GPIO_MMC_POWER, power_on);
        return 0;
 }