diff options
author | Tim Kryger <tim.kryger@linaro.org> | 2014-05-06 15:57:01 -0700 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-05-12 18:08:24 -0400 |
commit | 4d1f52f9a9f9a63371dba589093b3ae90fc80c3d (patch) | |
tree | c79807df571fa6b0dd63abba62b8e1ccc92ca463 /include/linux/mmc | |
parent | bc3c17711e5a6d3b1d1cf7f6b3fe081d81d68dcb (diff) | |
download | blackbird-obmc-linux-4d1f52f9a9f9a63371dba589093b3ae90fc80c3d.tar.gz blackbird-obmc-linux-4d1f52f9a9f9a63371dba589093b3ae90fc80c3d.zip |
mmc: core: Improve support for deferred regulators
Callers of mmc_regulator_get_supply could benefit from knowing if either
of the regulators are present but not yet available. Since callers do
not currently examine the return value, modify this function to return
zero or -EPROBE_DEFER if either regulator get returns the same.
Furthermore, since callers check vmmc/vqmmc using IS_ERR and can deal
with absent regulators, switch to devm_regulator_get_optional. This has
the added benefit of allowing this function to behave correctly even in
the !CONFIG_REGULATOR case such that the stub can be removed.
Signed-off-by: Tim Kryger <tim.kryger@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r-- | include/linux/mmc/host.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 183087374215..cd595275e118 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -402,7 +402,6 @@ int mmc_regulator_get_ocrmask(struct regulator *supply); int mmc_regulator_set_ocr(struct mmc_host *mmc, struct regulator *supply, unsigned short vdd_bit); -int mmc_regulator_get_supply(struct mmc_host *mmc); #else static inline int mmc_regulator_get_ocrmask(struct regulator *supply) { @@ -415,13 +414,10 @@ static inline int mmc_regulator_set_ocr(struct mmc_host *mmc, { return 0; } - -static inline int mmc_regulator_get_supply(struct mmc_host *mmc) -{ - return 0; -} #endif +int mmc_regulator_get_supply(struct mmc_host *mmc); + int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); static inline int mmc_card_is_removable(struct mmc_host *host) |