power: bq27xxx: don't fill system log by missing battery
authorNeilBrown <neilb@suse.de>
Wed, 7 Oct 2015 18:42:38 +0000 (20:42 +0200)
committerSebastian Reichel <sre@kernel.org>
Sat, 5 Dec 2015 01:06:50 +0000 (02:06 +0100)
Print message that battery is not calibrated only once
to avoid spamming the log.

Suggested-By: H. Nikolaus Schaller <hns@goldelico.com>
Suggested-By: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/bq27xxx_battery.c

index 880233ce9343809999ead8d957d65054c076b592..1cad7accf339200e1fce4edfa04b1827f392cc36 100644 (file)
@@ -722,7 +722,7 @@ static void bq27xxx_battery_update(struct bq27xxx_device_info *di)
        if (cache.flags >= 0) {
                cache.temperature = bq27xxx_battery_read_temperature(di);
                if (has_ci_flag && (cache.flags & BQ27000_FLAG_CI)) {
-                       dev_info(di->dev, "battery is not calibrated! ignoring capacity values\n");
+                       dev_info_once(di->dev, "battery is not calibrated! ignoring capacity values\n");
                        cache.capacity = -ENODATA;
                        cache.energy = -ENODATA;
                        cache.time_to_empty = -ENODATA;