Commit 7b16a07c authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Mark Brown

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: default avatarBjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e39ce48f
...@@ -4225,22 +4225,15 @@ static struct scsi_host_template ufshcd_driver_template = { ...@@ -4225,22 +4225,15 @@ static struct scsi_host_template ufshcd_driver_template = {
static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg, static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg,
int ua) int ua)
{ {
int ret = 0; int ret;
struct regulator *reg = vreg->reg;
const char *name = vreg->name;
BUG_ON(!vreg); if (!vreg)
return 0;
ret = regulator_set_optimum_mode(reg, ua); ret = regulator_set_load(vreg->reg, ua);
if (ret >= 0) { if (ret < 0) {
/* dev_err(dev, "%s: %s set load (ua=%d) failed, err=%d\n",
* regulator_set_optimum_mode() returns new regulator __func__, vreg->name, ua, ret);
* mode upon success.
*/
ret = 0;
} else {
dev_err(dev, "%s: %s set optimum mode(ua=%d) failed, err=%d\n",
__func__, name, ua, ret);
} }
return ret; return ret;
...@@ -4249,18 +4242,12 @@ static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg, ...@@ -4249,18 +4242,12 @@ static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg,
static inline int ufshcd_config_vreg_lpm(struct ufs_hba *hba, static inline int ufshcd_config_vreg_lpm(struct ufs_hba *hba,
struct ufs_vreg *vreg) struct ufs_vreg *vreg)
{ {
if (!vreg)
return 0;
return ufshcd_config_vreg_load(hba->dev, vreg, UFS_VREG_LPM_LOAD_UA); return ufshcd_config_vreg_load(hba->dev, vreg, UFS_VREG_LPM_LOAD_UA);
} }
static inline int ufshcd_config_vreg_hpm(struct ufs_hba *hba, static inline int ufshcd_config_vreg_hpm(struct ufs_hba *hba,
struct ufs_vreg *vreg) struct ufs_vreg *vreg)
{ {
if (!vreg)
return 0;
return ufshcd_config_vreg_load(hba->dev, vreg, vreg->max_uA); return ufshcd_config_vreg_load(hba->dev, vreg, vreg->max_uA);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment