summaryrefslogtreecommitdiff
path: root/common/led_policy_std.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/led_policy_std.c')
-rw-r--r--common/led_policy_std.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/common/led_policy_std.c b/common/led_policy_std.c
index 0a5cd6460f..9a34abd6eb 100644
--- a/common/led_policy_std.c
+++ b/common/led_policy_std.c
@@ -152,7 +152,6 @@ static void std_led_set_power(void)
static void std_led_set_battery(void)
{
static int battery_second;
- uint32_t chflags = charge_get_flags();
battery_second++;
@@ -181,11 +180,11 @@ static void std_led_set_battery(void)
bat_led_set_color(LED_GREEN);
break;
case PWR_STATE_IDLE: /* External power connected in IDLE. */
- if (chflags & CHARGE_FLAG_FORCE_IDLE)
- bat_led_set_color((battery_second & 0x2) ? LED_GREEN :
- LED_AMBER);
- else
- bat_led_set_color(LED_GREEN);
+ bat_led_set_color(LED_GREEN);
+ break;
+ case PWR_STATE_FORCED_IDLE:
+ bat_led_set_color((battery_second & 0x2) ? LED_GREEN :
+ LED_AMBER);
break;
default:
/* Other states don't alter LED behavior */