]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branches 'acpi-processor', 'acpi-hotplug' and 'acpi-battery'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 10 Aug 2014 14:23:33 +0000 (16:23 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 10 Aug 2014 14:23:33 +0000 (16:23 +0200)
* acpi-processor:
  ACPI / processor: Make acpi_cpu_soft_notify() process CPU FROZEN events

* acpi-hotplug:
  ACPI / hotplug: Check scan handlers in acpi_scan_hot_remove()

* acpi-battery:
  ACPI / battery: Fix warning message in acpi_battery_get_state()

drivers/acpi/battery.c
drivers/acpi/processor_driver.c
drivers/acpi/scan.c

index 48bcf38a0ea895fc34ea045ccddf339beee5c3a3..1c162e7be045405f267ef8d8140795508f8ea1c0 100644 (file)
@@ -540,12 +540,12 @@ static int acpi_battery_get_state(struct acpi_battery *battery)
         */
        if (battery->capacity_now > battery->full_charge_capacity
            && battery->full_charge_capacity != ACPI_BATTERY_VALUE_UNKNOWN) {
-               battery->capacity_now = battery->full_charge_capacity;
                if (battery->capacity_now != battery->design_capacity)
                        printk_once(KERN_WARNING FW_BUG
                                "battery: reported current charge level (%d) "
                                "is higher than reported maximum charge level (%d).\n",
                                battery->capacity_now, battery->full_charge_capacity);
+               battery->capacity_now = battery->full_charge_capacity;
        }
 
        if (test_bit(ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, &battery->flags)
index 4fcbd670415c6fa1a61b02a970563a5d220a9ea7..d9f71581b79b2ede3d90398a6265f6378fa748ac 100644 (file)
@@ -120,6 +120,7 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
        unsigned int cpu = (unsigned long)hcpu;
        struct acpi_processor *pr = per_cpu(processors, cpu);
        struct acpi_device *device;
+       action &= ~CPU_TASKS_FROZEN;
 
        /*
         * CPU_STARTING and CPU_DYING must not sleep. Return here since
index 5d592e17d760ebe940f3a64d9c6a30f5d8f158b8..0a817ad24f16f75853d34e11deb1a226ef3d9ed0 100644 (file)
@@ -353,7 +353,8 @@ static int acpi_scan_hot_remove(struct acpi_device *device)
        unsigned long long sta;
        acpi_status status;
 
-       if (device->handler->hotplug.demand_offline && !acpi_force_hot_remove) {
+       if (device->handler && device->handler->hotplug.demand_offline
+           && !acpi_force_hot_remove) {
                if (!acpi_scan_is_offline(device, true))
                        return -EBUSY;
        } else {