mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-04-06 14:55:53 +00:00
ANDROID: GKI: google_battery: return string type for serial_number property
Bug: 146759409 Change-Id: Idbd61d9007e645b78eba1690ad6e58825f79787d Signed-off-by: YiHsiang Peng <yihsiangpeng@google.com> (cherry picked from commit 686c676a7fc07b45d364408eb1c125523e2a7e5f) Signed-off-by: Mark Salyzyn <salyzyn@google.com> Bug: 150789066
This commit is contained in:
committed by
Mark Salyzyn
parent
0de5e99fb8
commit
363ef6df52
@ -221,15 +221,9 @@ static ssize_t power_supply_show_property(struct device *dev,
|
||||
case POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT:
|
||||
ret = sprintf(buf, "%lld\n", value.int64val);
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_MODEL_NAME ... POWER_SUPPLY_PROP_CYCLE_COUNTS:
|
||||
case POWER_SUPPLY_PROP_MODEL_NAME ... POWER_SUPPLY_PROP_SERIAL_NUMBER:
|
||||
ret = sprintf(buf, "%s\n", value.strval);
|
||||
break;
|
||||
/*
|
||||
* FIXME: b/139264914, ignore it temporarily to avoid hit NULL point.
|
||||
* will review it
|
||||
*/
|
||||
case POWER_SUPPLY_PROP_SERIAL_NUMBER:
|
||||
break;
|
||||
default:
|
||||
ret = sprintf(buf, "%d\n", value.intval);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user