summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/poodle.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-07-05 19:51:20 +0400
committerOlof Johansson <olof@lixom.net>2013-07-23 23:15:15 +0400
commita829abf8daa2dcf8223a9284b76d221e61130e13 (patch)
tree1adb4dfbecaf88fc6701d7148cd0743b0957e5c0 /arch/arm/mach-pxa/poodle.c
parentfe08bf9f46d6ae8e08de32d29234a2c928eebf8f (diff)
downloadlinux-a829abf8daa2dcf8223a9284b76d221e61130e13.tar.xz
ARM: pxa: propagate errors from regulator_enable() to pxamci
The em_x270_mci_setpower() and em_x270_usb_hub_init() functions call regulator_enable(), which may return an error that must be checked. This changes the em_x270_usb_hub_init() function to bail out if it fails, and changes the pxamci_platform_data->setpower callback so that the a failed em_x270_mci_setpower call can be propagated by the pxamci driver into the mmc core. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Mike Rapoport <mike@compulab.co.il> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Acked-by: Chris Ball <cjb@laptop.org> [olof: fixed order of regulator_enable() and test in em_x270_usb_hub_init] Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-pxa/poodle.c')
-rw-r--r--arch/arm/mach-pxa/poodle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 711d37e26bd8..aedf053a1de5 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -258,7 +258,7 @@ err_free_2:
return err;
}
-static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
+static int poodle_mci_setpower(struct device *dev, unsigned int vdd)
{
struct pxamci_platform_data* p_d = dev->platform_data;
@@ -270,6 +270,8 @@ static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
gpio_set_value(POODLE_GPIO_SD_PWR1, 0);
gpio_set_value(POODLE_GPIO_SD_PWR, 0);
}
+
+ return 0;
}
static void poodle_mci_exit(struct device *dev, void *data)