mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04: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 <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Mark Brown <[email protected]> Cc: Haojian Zhuang <[email protected]> Acked-by: Chris Ball <[email protected]> [olof: fixed order of regulator_enable() and test in em_x270_usb_hub_init] Signed-off-by: Olof Johansson <[email protected]>
This commit is contained in:
parent
fe08bf9f46
commit
a829abf8da
8 changed files with 27 additions and 11 deletions
|
|
@ -128,7 +128,7 @@ static inline int pxamci_set_power(struct pxamci_host *host,
|
|||
!!on ^ host->pdata->gpio_power_invert);
|
||||
}
|
||||
if (!host->vcc && host->pdata && host->pdata->setpower)
|
||||
host->pdata->setpower(mmc_dev(host->mmc), vdd);
|
||||
return host->pdata->setpower(mmc_dev(host->mmc), vdd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue