Skip to content

Commit

Permalink
Merge branches 'acpi-processor', 'acpi-hotplug' and 'acpi-battery'
Browse files Browse the repository at this point in the history
* 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()
  • Loading branch information
Rafael J. Wysocki committed Aug 10, 2014
4 parents 7725131 + ea9c167 + dee1592 + d719870 commit 21c806d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/processor_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 21c806d

Please sign in to comment.