summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-10-26 14:03:08 -0400
committerTom Rini <trini@ti.com>2014-10-26 14:03:08 -0400
commit84a6df09c78bc9e9cbc6265d99c9097f5f1079f2 (patch)
tree3b2bf1b3689e9aad0d20f5a69ada168cae3cc769 /drivers/mmc
parentc69ecd9722af22d50295eff81d0b9cd5b8adc2e0 (diff)
parentc2ded962d4703a3f9522553004db4a6fe540f7e6 (diff)
downloadu-boot-imx-84a6df09c78bc9e9cbc6265d99c9097f5f1079f2.zip
u-boot-imx-84a6df09c78bc9e9cbc6265d99c9097f5f1079f2.tar.gz
u-boot-imx-84a6df09c78bc9e9cbc6265d99c9097f5f1079f2.tar.bz2
Merge git://git.denx.de/u-boot-dm
Fix a trivial conflict over adding <dm.h> Conflicts: arch/arm/cpu/armv7/omap3/board.c Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/omap_hsmmc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 5b0c302..ef2cbf9 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -67,14 +67,19 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
#ifdef OMAP_HSMMC_USE_GPIO
static int omap_mmc_setup_gpio_in(int gpio, const char *label)
{
- if (!gpio_is_valid(gpio))
- return -1;
+ int ret;
- if (gpio_request(gpio, label) < 0)
+#ifndef CONFIG_DM_GPIO
+ if (!gpio_is_valid(gpio))
return -1;
+#endif
+ ret = gpio_request(gpio, label);
+ if (ret)
+ return ret;
- if (gpio_direction_input(gpio) < 0)
- return -1;
+ ret = gpio_direction_input(gpio);
+ if (ret)
+ return ret;
return gpio;
}