From de30265558012b3c9903206c18baf6a2ecc86829 Mon Sep 17 00:00:00 2001 From: xuwei9 Date: Mon, 7 Jan 2019 15:18:43 +0800 Subject: [PATCH] kernel:battery temperature is zero during power on battery temp is zero during power on Change-Id: If07b1b50e4ee49034ddc6f2064bb5f97271565d0 Signed-off-by: xuwei9 Reviewed-on: https://gerrit.mot.com/1290370 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/power/supply/s2mu106_fuelgauge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/s2mu106_fuelgauge.c b/drivers/power/supply/s2mu106_fuelgauge.c index fb618ac7e4df..b3297c511ba9 100755 --- a/drivers/power/supply/s2mu106_fuelgauge.c +++ b/drivers/power/supply/s2mu106_fuelgauge.c @@ -1016,7 +1016,7 @@ static int s2mu106_get_rawsoc(struct s2mu106_fuelgauge_data *fuelgauge) ret = power_supply_get_property(psy, POWER_SUPPLY_PROP_TEMP, &value); if (ret < 0) pr_err("%s: Fail to execute property\n", __func__); - fuelgauge->temperature = value.intval; + fuelgauge->temperature = ntc_show_batt_temp(); #else fuelgauge->temperature = s2mu106_get_temperature(fuelgauge); #endif -- 2.20.1