Skip to content

Commit

Permalink
fix(battery): Only log if finding battery device failed
Browse files Browse the repository at this point in the history
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
  • Loading branch information
Nicell and petejohanson committed Nov 2, 2020
1 parent 953de71 commit 89b8bfc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/src/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ K_TIMER_DEFINE(battery_timer, zmk_battery_timer, NULL);
static int zmk_battery_init(struct device *_arg) {
battery = device_get_binding("BATTERY");

if (battery) {
LOG_DBG("Found battery reporting device.");
} else {
if (battery == NULL) {
LOG_DBG("No battery device labelled BATTERY found.");
return -ENODEV;
}
Expand Down

0 comments on commit 89b8bfc

Please sign in to comment.