Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 82f2d305 authored by Lucas Rangit Magasweran's avatar Lucas Rangit Magasweran Committed by Rafael J. Wysocki
Browse files

ACPI: battery: remove redundant old_present check on insertion



On removal battery_present changes from 1 to 0 after calling
acpi_battery_get_status() and battery->update_time is set to 0
before returning.

On insertion battery_present changes from 0 to 1 after calling
acpi_battery_get_status() and acpi_battery_get_info() is called
because battery->update_time is 0.

The old_present condition is therefore redundant.

This was added in the commit below when there was a path without
sysfs that would skip getting the newly inserted battery info.

commit 50b17851 ("Newly inserted battery might differ from one
just removed, so update of battery info fields is required.")

Signed-off-by: default avatarLucas Rangit Magasweran <lucas.magasweran@ieee.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 9d3cce1e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment