diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-h2-mmc.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h2-mmc.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/arm/mach-omap1/board-h2-mmc.c b/arch/arm/mach-omap1/board-h2-mmc.c index 44d4a966bed9..46098f546824 100644 --- a/arch/arm/mach-omap1/board-h2-mmc.c +++ b/arch/arm/mach-omap1/board-h2-mmc.c | |||
@@ -26,19 +26,13 @@ | |||
26 | static int mmc_set_power(struct device *dev, int slot, int power_on, | 26 | static int mmc_set_power(struct device *dev, int slot, int power_on, |
27 | int vdd) | 27 | int vdd) |
28 | { | 28 | { |
29 | if (power_on) | 29 | gpio_set_value(H2_TPS_GPIO_MMC_PWR_EN, power_on); |
30 | gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 1); | ||
31 | else | ||
32 | gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 0); | ||
33 | |||
34 | return 0; | 30 | return 0; |
35 | } | 31 | } |
36 | 32 | ||
37 | static int mmc_late_init(struct device *dev) | 33 | static int mmc_late_init(struct device *dev) |
38 | { | 34 | { |
39 | int ret; | 35 | int ret = gpio_request(H2_TPS_GPIO_MMC_PWR_EN, "MMC power"); |
40 | |||
41 | ret = gpio_request(H2_TPS_GPIO_MMC_PWR_EN, "MMC power"); | ||
42 | if (ret < 0) | 36 | if (ret < 0) |
43 | return ret; | 37 | return ret; |
44 | 38 | ||
@@ -47,7 +41,7 @@ static int mmc_late_init(struct device *dev) | |||
47 | return ret; | 41 | return ret; |
48 | } | 42 | } |
49 | 43 | ||
50 | static void mmc_shutdown(struct device *dev) | 44 | static void mmc_cleanup(struct device *dev) |
51 | { | 45 | { |
52 | gpio_free(H2_TPS_GPIO_MMC_PWR_EN); | 46 | gpio_free(H2_TPS_GPIO_MMC_PWR_EN); |
53 | } | 47 | } |
@@ -60,7 +54,7 @@ static void mmc_shutdown(struct device *dev) | |||
60 | static struct omap_mmc_platform_data mmc1_data = { | 54 | static struct omap_mmc_platform_data mmc1_data = { |
61 | .nr_slots = 1, | 55 | .nr_slots = 1, |
62 | .init = mmc_late_init, | 56 | .init = mmc_late_init, |
63 | .shutdown = mmc_shutdown, | 57 | .cleanup = mmc_cleanup, |
64 | .dma_mask = 0xffffffff, | 58 | .dma_mask = 0xffffffff, |
65 | .slots[0] = { | 59 | .slots[0] = { |
66 | .set_power = mmc_set_power, | 60 | .set_power = mmc_set_power, |