diff options
author | Bjorn Andersson <bjorn.andersson@sonymobile.com> | 2015-02-11 22:35:28 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-09 14:32:25 -0400 |
commit | 7b16a07c32935ea7f59f4408b7c9200d9cd0cced (patch) | |
tree | e6a6ade34c6d2ea0b458a0f87ef2a6369a13c836 | |
parent | e39ce48f5362df9f87400b4909a6fb0f51b109ac (diff) |
ufs: Rename of regulator_set_optimum_mode
The function regulator_set_optimum_mode() is changing name to
regulator_set_load(), so update the code accordingly. Also cleaned up
ufshcd_config_vreg_load() while touching the code.
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 5d60a868830d..2aa85e398f76 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c | |||
@@ -4225,22 +4225,15 @@ static struct scsi_host_template ufshcd_driver_template = { | |||
4225 | static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg, | 4225 | static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg, |
4226 | int ua) | 4226 | int ua) |
4227 | { | 4227 | { |
4228 | int ret = 0; | 4228 | int ret; |
4229 | struct regulator *reg = vreg->reg; | ||
4230 | const char *name = vreg->name; | ||
4231 | 4229 | ||
4232 | BUG_ON(!vreg); | 4230 | if (!vreg) |
4231 | return 0; | ||
4233 | 4232 | ||
4234 | ret = regulator_set_optimum_mode(reg, ua); | 4233 | ret = regulator_set_load(vreg->reg, ua); |
4235 | if (ret >= 0) { | 4234 | if (ret < 0) { |
4236 | /* | 4235 | dev_err(dev, "%s: %s set load (ua=%d) failed, err=%d\n", |
4237 | * regulator_set_optimum_mode() returns new regulator | 4236 | __func__, vreg->name, ua, ret); |
4238 | * mode upon success. | ||
4239 | */ | ||
4240 | ret = 0; | ||
4241 | } else { | ||
4242 | dev_err(dev, "%s: %s set optimum mode(ua=%d) failed, err=%d\n", | ||
4243 | __func__, name, ua, ret); | ||
4244 | } | 4237 | } |
4245 | 4238 | ||
4246 | return ret; | 4239 | return ret; |
@@ -4249,18 +4242,12 @@ static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg, | |||
4249 | static inline int ufshcd_config_vreg_lpm(struct ufs_hba *hba, | 4242 | static inline int ufshcd_config_vreg_lpm(struct ufs_hba *hba, |
4250 | struct ufs_vreg *vreg) | 4243 | struct ufs_vreg *vreg) |
4251 | { | 4244 | { |
4252 | if (!vreg) | ||
4253 | return 0; | ||
4254 | |||
4255 | return ufshcd_config_vreg_load(hba->dev, vreg, UFS_VREG_LPM_LOAD_UA); | 4245 | return ufshcd_config_vreg_load(hba->dev, vreg, UFS_VREG_LPM_LOAD_UA); |
4256 | } | 4246 | } |
4257 | 4247 | ||
4258 | static inline int ufshcd_config_vreg_hpm(struct ufs_hba *hba, | 4248 | static inline int ufshcd_config_vreg_hpm(struct ufs_hba *hba, |
4259 | struct ufs_vreg *vreg) | 4249 | struct ufs_vreg *vreg) |
4260 | { | 4250 | { |
4261 | if (!vreg) | ||
4262 | return 0; | ||
4263 | |||
4264 | return ufshcd_config_vreg_load(hba->dev, vreg, vreg->max_uA); | 4251 | return ufshcd_config_vreg_load(hba->dev, vreg, vreg->max_uA); |
4265 | } | 4252 | } |
4266 | 4253 | ||