提交 1f94b256 编写于 作者: N NeilBrown 提交者: Sebastian Reichel

power: bq27xxx: don't fill system log by missing battery

Print message that battery is not calibrated only once
to avoid spamming the log.
Suggested-By: NH. Nikolaus Schaller <hns@goldelico.com>
Suggested-By: NPali Rohár <pali.rohar@gmail.com>
Signed-off-by: NSebastian Reichel <sre@kernel.org>
上级 d5fdfedc
...@@ -722,7 +722,7 @@ static void bq27xxx_battery_update(struct bq27xxx_device_info *di) ...@@ -722,7 +722,7 @@ static void bq27xxx_battery_update(struct bq27xxx_device_info *di)
if (cache.flags >= 0) { if (cache.flags >= 0) {
cache.temperature = bq27xxx_battery_read_temperature(di); cache.temperature = bq27xxx_battery_read_temperature(di);
if (has_ci_flag && (cache.flags & BQ27000_FLAG_CI)) { 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.capacity = -ENODATA;
cache.energy = -ENODATA; cache.energy = -ENODATA;
cache.time_to_empty = -ENODATA; cache.time_to_empty = -ENODATA;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册