mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
charging: fixed uevent block issue
cat sys/class/power_supply/battery/uevent and return null, so UI can't show turbopower label. The power supply val->intval can't equal to -EINVAL. Change-Id: Ibd6a40770144185b11c54e8f21741fc06477686c Signed-off-by: mahj8 <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/2121820 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
08b3dee44f
commit
5dd6f5b15a
1 changed files with 9 additions and 6 deletions
|
|
@ -1063,12 +1063,15 @@ static int batt_get_prop(struct power_supply *psy,
|
|||
break;
|
||||
default:
|
||||
mmi_err(chip, "Get not support prop %d rc = %d\n", psp, rc);
|
||||
/* soft fail so uevents are not blocked */
|
||||
rc = 0;
|
||||
val->intval = -EINVAL;
|
||||
rc = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (rc < 0) {
|
||||
pr_debug("Couldn't get prop %d rc = %d\n", psp, rc);
|
||||
return -ENODATA;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -1096,11 +1099,11 @@ static int batt_set_prop(struct power_supply *psy,
|
|||
vote(chip->fcc_votable, USER_VOTER, true, val->intval);
|
||||
break;
|
||||
default:
|
||||
mmi_dbg(chip, "Get not support prop %d rc = %d\n", prop, rc);
|
||||
/* soft fail so uevents are not blocked */
|
||||
rc = 0;
|
||||
mmi_dbg(chip, "Set not support prop %d rc = %d\n", prop, rc);
|
||||
rc = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue