diff options
Diffstat (limited to 'drivers/acpi')
| -rw-r--r-- | drivers/acpi/acpi_cmos_rtc.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/acpi_lpss.c | 10 | ||||
| -rw-r--r-- | drivers/acpi/battery.c | 14 |
3 files changed, 6 insertions, 20 deletions
diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c index 2da8660262e5..81dc75033f15 100644 --- a/drivers/acpi/acpi_cmos_rtc.c +++ b/drivers/acpi/acpi_cmos_rtc.c | |||
| @@ -33,7 +33,7 @@ acpi_cmos_rtc_space_handler(u32 function, acpi_physical_address address, | |||
| 33 | void *handler_context, void *region_context) | 33 | void *handler_context, void *region_context) |
| 34 | { | 34 | { |
| 35 | int i; | 35 | int i; |
| 36 | u8 *value = (u8 *)&value64; | 36 | u8 *value = (u8 *)value64; |
| 37 | 37 | ||
| 38 | if (address > 0xff || !value64) | 38 | if (address > 0xff || !value64) |
| 39 | return AE_BAD_PARAMETER; | 39 | return AE_BAD_PARAMETER; |
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 9dfec48dd4e5..fddc1e86f9d0 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c | |||
| @@ -610,7 +610,7 @@ static int acpi_lpss_suspend_late(struct device *dev) | |||
| 610 | return acpi_dev_suspend_late(dev); | 610 | return acpi_dev_suspend_late(dev); |
| 611 | } | 611 | } |
| 612 | 612 | ||
| 613 | static int acpi_lpss_restore_early(struct device *dev) | 613 | static int acpi_lpss_resume_early(struct device *dev) |
| 614 | { | 614 | { |
| 615 | int ret = acpi_dev_resume_early(dev); | 615 | int ret = acpi_dev_resume_early(dev); |
| 616 | 616 | ||
| @@ -650,15 +650,15 @@ static int acpi_lpss_runtime_resume(struct device *dev) | |||
| 650 | static struct dev_pm_domain acpi_lpss_pm_domain = { | 650 | static struct dev_pm_domain acpi_lpss_pm_domain = { |
| 651 | .ops = { | 651 | .ops = { |
| 652 | #ifdef CONFIG_PM_SLEEP | 652 | #ifdef CONFIG_PM_SLEEP |
| 653 | .suspend_late = acpi_lpss_suspend_late, | ||
| 654 | .restore_early = acpi_lpss_restore_early, | ||
| 655 | .prepare = acpi_subsys_prepare, | 653 | .prepare = acpi_subsys_prepare, |
| 656 | .complete = acpi_subsys_complete, | 654 | .complete = acpi_subsys_complete, |
| 657 | .suspend = acpi_subsys_suspend, | 655 | .suspend = acpi_subsys_suspend, |
| 658 | .resume_early = acpi_subsys_resume_early, | 656 | .suspend_late = acpi_lpss_suspend_late, |
| 657 | .resume_early = acpi_lpss_resume_early, | ||
| 659 | .freeze = acpi_subsys_freeze, | 658 | .freeze = acpi_subsys_freeze, |
| 660 | .poweroff = acpi_subsys_suspend, | 659 | .poweroff = acpi_subsys_suspend, |
| 661 | .poweroff_late = acpi_subsys_suspend_late, | 660 | .poweroff_late = acpi_lpss_suspend_late, |
| 661 | .restore_early = acpi_lpss_resume_early, | ||
| 662 | #endif | 662 | #endif |
| 663 | #ifdef CONFIG_PM_RUNTIME | 663 | #ifdef CONFIG_PM_RUNTIME |
| 664 | .runtime_suspend = acpi_lpss_runtime_suspend, | 664 | .runtime_suspend = acpi_lpss_runtime_suspend, |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 1c162e7be045..5fdfe65fe165 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
| @@ -534,20 +534,6 @@ static int acpi_battery_get_state(struct acpi_battery *battery) | |||
| 534 | " invalid.\n"); | 534 | " invalid.\n"); |
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | /* | ||
| 538 | * When fully charged, some batteries wrongly report | ||
| 539 | * capacity_now = design_capacity instead of = full_charge_capacity | ||
| 540 | */ | ||
| 541 | if (battery->capacity_now > battery->full_charge_capacity | ||
| 542 | && battery->full_charge_capacity != ACPI_BATTERY_VALUE_UNKNOWN) { | ||
| 543 | if (battery->capacity_now != battery->design_capacity) | ||
| 544 | printk_once(KERN_WARNING FW_BUG | ||
| 545 | "battery: reported current charge level (%d) " | ||
| 546 | "is higher than reported maximum charge level (%d).\n", | ||
| 547 | battery->capacity_now, battery->full_charge_capacity); | ||
| 548 | battery->capacity_now = battery->full_charge_capacity; | ||
| 549 | } | ||
| 550 | |||
| 551 | if (test_bit(ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, &battery->flags) | 537 | if (test_bit(ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, &battery->flags) |
| 552 | && battery->capacity_now >= 0 && battery->capacity_now <= 100) | 538 | && battery->capacity_now >= 0 && battery->capacity_now <= 100) |
| 553 | battery->capacity_now = (battery->capacity_now * | 539 | battery->capacity_now = (battery->capacity_now * |
