fix(battery): Only log if finding battery device failed

Co-authored-by: Pete Johanson <peter@peterjohanson.com>
This commit is contained in:
Nick Winans 2020-10-28 09:17:08 -05:00 committed by GitHub
parent a632e9d315
commit 6c14bd78c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}