lkml.org 
[lkml]   [2009]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 36/41] Newly inserted battery might differ from one just removed, so
    2.6.27-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Alexey Starikovskiy <astarikovskiy@suse.de>

    commit 50b178512b7d6e7724f87459f6bd06504c9c2da1 upstream.

    Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
    Acked-by: Andy Neitzke <neitzke@ias.edu>

    Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
    Signed-off-by: Len Brown <len.brown@intel.com>
    Cc: Thomas Renninger <trenn@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/acpi/battery.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    --- a/drivers/acpi/battery.c
    +++ b/drivers/acpi/battery.c
    @@ -472,7 +472,7 @@ static void sysfs_remove_battery(struct

    static int acpi_battery_update(struct acpi_battery *battery)
    {
    - int result;
    + int result, old_present = acpi_battery_present(battery);
    result = acpi_battery_get_status(battery);
    if (result)
    return result;
    @@ -483,7 +483,8 @@ static int acpi_battery_update(struct ac
    return 0;
    }
    #endif
    - if (!battery->update_time) {
    + if (!battery->update_time ||
    + old_present != acpi_battery_present(battery)) {
    result = acpi_battery_get_info(battery);
    if (result)
    return result;


    \
     
     \ /
      Last update: 2009-02-04 20:07    [W:0.023 / U:0.488 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site