ARM: pxa: propagate errors from regulator_enable() to pxamci
authorArnd Bergmann <arnd@arndb.de>
Fri, 5 Jul 2013 15:51:20 +0000 (17:51 +0200)
committerOlof Johansson <olof@lixom.net>
Tue, 23 Jul 2013 19:15:15 +0000 (12:15 -0700)
commita829abf8daa2dcf8223a9284b76d221e61130e13
tree1adb4dfbecaf88fc6701d7148cd0743b0957e5c0
parentfe08bf9f46d6ae8e08de32d29234a2c928eebf8f
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>
arch/arm/mach-pxa/em-x270.c
arch/arm/mach-pxa/mainstone.c
arch/arm/mach-pxa/pcm990-baseboard.c
arch/arm/mach-pxa/poodle.c
arch/arm/mach-pxa/spitz.c
arch/arm/mach-pxa/stargate2.c
drivers/mmc/host/pxamci.c
include/linux/platform_data/mmc-pxamci.h