diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 14:55:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 14:55:14 -0500 |
commit | a3a798c88a14b35e5d4ca30716dbc9eb9a1ddfe2 (patch) | |
tree | 393969a0f1405237483c8c29b904690f2bb90559 /drivers/acpi/battery.c | |
parent | efcb3cf7f00c3c424db012380a8a974c2676a3c8 (diff) | |
parent | d97c0defba25a959a990f6d4759f43075540832e (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (94 commits)
ACPICA: hide private headers
ACPICA: create acpica/ directory
ACPI: fix build warning
ACPI : Use RSDT instead of XSDT by adding boot option of "acpi=rsdt"
ACPI: Avoid array address overflow when _CST MWAIT hint bits are set
fujitsu-laptop: Simplify SBLL/SBL2 backlight handling
fujitsu-laptop: Add BL power, LED control and radio state information
ACPICA: delete utcache.c
ACPICA: delete acdisasm.h
ACPICA: Update version to 20081204.
ACPICA: FADT: Update error msgs for consistency
ACPICA: FADT: set acpi_gbl_use_default_register_widths to TRUE by default
ACPICA: FADT parsing changes and fixes
ACPICA: Add ACPI_MUTEX_TYPE configuration option
ACPICA: Fixes for various ACPI data tables
ACPICA: Restructure includes into public/private
ACPI: remove private acpica headers from driver files
ACPI: reboot.c: use new acpi_reset interface
ACPICA: New: acpi_reset interface - write to reset register
ACPICA: Move all public H/W interfaces to new hwxface
...
Diffstat (limited to 'drivers/acpi/battery.c')
-rw-r--r-- | drivers/acpi/battery.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 1423b0c0cd2e..65132f920459 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -471,7 +471,7 @@ static void sysfs_remove_battery(struct acpi_battery *battery) | |||
471 | 471 | ||
472 | static int acpi_battery_update(struct acpi_battery *battery) | 472 | static int acpi_battery_update(struct acpi_battery *battery) |
473 | { | 473 | { |
474 | int result; | 474 | int result, old_present = acpi_battery_present(battery); |
475 | result = acpi_battery_get_status(battery); | 475 | result = acpi_battery_get_status(battery); |
476 | if (result) | 476 | if (result) |
477 | return result; | 477 | return result; |
@@ -482,7 +482,8 @@ static int acpi_battery_update(struct acpi_battery *battery) | |||
482 | return 0; | 482 | return 0; |
483 | } | 483 | } |
484 | #endif | 484 | #endif |
485 | if (!battery->update_time) { | 485 | if (!battery->update_time || |
486 | old_present != acpi_battery_present(battery)) { | ||
486 | result = acpi_battery_get_info(battery); | 487 | result = acpi_battery_get_info(battery); |
487 | if (result) | 488 | if (result) |
488 | return result; | 489 | return result; |