mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 21:21:47 +00:00
Merge branch 'battery' into release
This commit is contained in:
commit
a8e896e281
@ -471,7 +471,7 @@ static void sysfs_remove_battery(struct acpi_battery *battery)
|
||||
|
||||
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;
|
||||
@ -482,7 +482,8 @@ static int acpi_battery_update(struct acpi_battery *battery)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user