• Bjørn Mork's avatar
    Revert "ACPI / battery: Fix warning message in acpi_battery_get_state()" · 583ee394
    Bjørn Mork authored
    This reverts commit d719870b ("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: d719870b ("ACPI / battery: Fix warning message in acpi_battery_get_state()")
    Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
    Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    583ee394
battery.c 38.4 KB