mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
fe08bf9f46
commit
a829abf8da
8 changed files with 27 additions and 11 deletions
|
@ -12,7 +12,7 @@ struct pxamci_platform_data {
|
|||
unsigned long detect_delay_ms; /* delay in millisecond before detecting cards after interrupt */
|
||||
int (*init)(struct device *, irq_handler_t , void *);
|
||||
int (*get_ro)(struct device *);
|
||||
void (*setpower)(struct device *, unsigned int);
|
||||
int (*setpower)(struct device *, unsigned int);
|
||||
void (*exit)(struct device *, void *);
|
||||
int gpio_card_detect; /* gpio detecting card insertion */
|
||||
int gpio_card_ro; /* gpio detecting read only toggle */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue