mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
power: rk817: fix compile warning
drivers/power/rk817_battery.c:2129:4: warning: this if clause does not guard... [-Wmisleading-indentation] drivers/power/rk817_battery.c:2920 rk817_bat_pm_resume() error: uninitialized symbol 'time_step'. Change-Id: I9af73c85192279cc0546a5844da65542806279d5 Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
@@ -2129,7 +2129,7 @@ static void rk817_bat_smooth_algorithm(struct rk817_battery_device *battery)
|
||||
if (battery->smooth_soc < battery->dsoc)
|
||||
return;
|
||||
|
||||
battery->dsoc = battery->smooth_soc;
|
||||
battery->dsoc = battery->smooth_soc;
|
||||
if (battery->dsoc <= 0)
|
||||
battery->dsoc = 0;
|
||||
}
|
||||
@@ -2917,8 +2917,8 @@ static int rk817_bat_pm_resume(struct device *dev)
|
||||
interval_sec);
|
||||
|
||||
/* sleep: enough time and discharge */
|
||||
if ((battery->sleep_dischrg_sec > time_step) &&
|
||||
(!battery->sleep_chrg_online)) {
|
||||
if ((!battery->sleep_chrg_online) &&
|
||||
(battery->sleep_dischrg_sec > time_step)) {
|
||||
if (rk817_bat_sleep_dischrg(battery))
|
||||
battery->sleep_dischrg_sec = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user