summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/amenia/board.c4
-rw-r--r--board/elm/board.c4
-rw-r--r--board/pyro/board.c6
-rw-r--r--board/reef/board.c6
-rw-r--r--board/snappy/board.c6
5 files changed, 8 insertions, 18 deletions
diff --git a/board/amenia/board.c b/board/amenia/board.c
index 536210bd3e..d8bffdd79b 100644
--- a/board/amenia/board.c
+++ b/board/amenia/board.c
@@ -315,10 +315,8 @@ int board_set_active_charge_port(int charge_port)
*/
if (!initialized &&
charge_port == CHARGE_PORT_NONE &&
- charge_get_percent() < 2) {
- CPRINTS("Battery critical, don't disable charging");
+ charge_get_percent() < 2)
return -1;
- }
CPRINTS("New chg p%d", charge_port);
diff --git a/board/elm/board.c b/board/elm/board.c
index 9a9c70918f..5631e1d7d2 100644
--- a/board/elm/board.c
+++ b/board/elm/board.c
@@ -298,10 +298,8 @@ int board_set_active_charge_port(int charge_port)
*/
if (!initialized &&
charge_port == CHARGE_PORT_NONE &&
- charge_get_percent() < 2) {
- CPRINTS("Battery critical, don't disable charging");
+ charge_get_percent() < 2)
return -1;
- }
if (is_real_port && source) {
CPRINTF("Skip enable p%d", charge_port);
diff --git a/board/pyro/board.c b/board/pyro/board.c
index 8ad3dc67af..280479712b 100644
--- a/board/pyro/board.c
+++ b/board/pyro/board.c
@@ -501,6 +501,7 @@ int board_set_active_charge_port(int charge_port)
CPRINTF("Skip enable p%d", charge_port);
return EC_ERROR_INVAL;
}
+
/*
* Reject charge port disable if our battery is critical and we
* have yet to initialize a charge port - continue to charge using
@@ -508,11 +509,8 @@ int board_set_active_charge_port(int charge_port)
*/
if (!initialized &&
charge_port == CHARGE_PORT_NONE &&
- charge_get_percent() < 2) {
- CPRINTS("Battery critical, don't disable charging");
+ charge_get_percent() < 2)
return -1;
- }
-
CPRINTS("New chg p%d", charge_port);
diff --git a/board/reef/board.c b/board/reef/board.c
index e0c7ba9dff..cec70666d9 100644
--- a/board/reef/board.c
+++ b/board/reef/board.c
@@ -501,6 +501,7 @@ int board_set_active_charge_port(int charge_port)
CPRINTF("Skip enable p%d", charge_port);
return EC_ERROR_INVAL;
}
+
/*
* Reject charge port disable if our battery is critical and we
* have yet to initialize a charge port - continue to charge using
@@ -508,11 +509,8 @@ int board_set_active_charge_port(int charge_port)
*/
if (!initialized &&
charge_port == CHARGE_PORT_NONE &&
- charge_get_percent() < 2) {
- CPRINTS("Battery critical, don't disable charging");
+ charge_get_percent() < 2)
return -1;
- }
-
CPRINTS("New chg p%d", charge_port);
diff --git a/board/snappy/board.c b/board/snappy/board.c
index 8c41ef36c5..0b2d042c63 100644
--- a/board/snappy/board.c
+++ b/board/snappy/board.c
@@ -501,6 +501,7 @@ int board_set_active_charge_port(int charge_port)
CPRINTF("Skip enable p%d", charge_port);
return EC_ERROR_INVAL;
}
+
/*
* Reject charge port disable if our battery is critical and we
* have yet to initialize a charge port - continue to charge using
@@ -508,11 +509,8 @@ int board_set_active_charge_port(int charge_port)
*/
if (!initialized &&
charge_port == CHARGE_PORT_NONE &&
- charge_get_percent() < 2) {
- CPRINTS("Battery critical, don't disable charging");
+ charge_get_percent() < 2)
return -1;
- }
-
CPRINTS("New chg p%d", charge_port);