Merge branches 'acpi-processor', 'acpi-hotplug' and 'acpi-battery'
* 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()
This commit is contained in:
commit
21c806d9b1
3 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue