]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Revert "ACPI / battery: Fix warning message in acpi_battery_get_state()"
authorBjørn Mork <bjorn@mork.no>
Tue, 9 Sep 2014 08:45:17 +0000 (10:45 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 9 Sep 2014 14:19:03 +0000 (16:19 +0200)
commit583ee394ac503ff9eac0f50673cd569643bdb3b4
treeda797d7a3f811846eeaf1b18dc064224f8d66766
parent2ce7598c9a453e0acd0e07be7be3f5eb39608ebd
Revert "ACPI / battery: Fix warning message in acpi_battery_get_state()"

This reverts commit d719870b41e0 ("ACPI / battery: Fix warning message in
acpi_battery_get_state()")

Capping 'capacity_now' to 'full_charge_capacity' is plain wrong. If this
is necessary to work around some buggy firmware, then the workaround needs
protection against being applied to working firmwares.

Good battery firmwares will allow 'capacity_now' to increase above
'full_charge_capacity', and will update the latter when the battery
is fully charged.  By capping 'capacity_now' we lose accurate capacity
reporting until charging is complete whenever 'full_charge_capacity'
needs to be increased.

Fixes: d719870b41e0 ("ACPI / battery: Fix warning message in acpi_battery_get_state()")
Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/battery.c