diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-11 12:28:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-11 12:28:17 -0700 |
commit | 7728f036adb25f8f7f8e36ffa9cecf6ba3ddae91 (patch) | |
tree | b37f71e5fd0d0bdd8919b294889c51f53320c513 /drivers/acpi | |
parent | 8cbd0eefcaf8cc32ded2bf229f0fc379b2ad69f2 (diff) | |
parent | d8851b4b0c1e7cf6cae829d060510437d2d320ee (diff) | |
download | talos-obmc-linux-7728f036adb25f8f7f8e36ffa9cecf6ba3ddae91.tar.gz talos-obmc-linux-7728f036adb25f8f7f8e36ffa9cecf6ba3ddae91.zip |
Merge tag 'pm+acpi-3.11-rc1-more' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more power management and ACPI updates from Rafael Wysocki:
- Fix for a recent cpufreq regression that caused WARN() to trigger
overzealously in a couple of places and spam the kernel log with
useless garbage as a result. From Viresh Kumar.
- ACPI dock fix removing a discrepancy between the definition of
acpi_dock_init(), which says that the function returns int, and its
header in the header file, which says that it is a void function.
The function is now defined as void too.
- ACPI PM fix for failures to update device power states as needed, for
example, during resume from system suspend, because the old state was
deeper than the new one, but the new one is not D0.
- Fix for two debug messages in the ACPI power resources code that
don't have a newline at the end and make the kernel log difficult to
read. From Mika Westerberg.
- Two ACPI cleanups from Naresh Bhat and Haicheng Li.
- cpupower updates from Thomas Renninger, including Intel Haswell
support improvements and a new idle-set subcommand among other
things.
* tag 'pm+acpi-3.11-rc1-more' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / power: add missing newline to debug messages
cpupower: Add Haswell family 0x45 specific idle monitor to show PC8,9,10 states
cpupower: Haswell also supports the C-states introduced with SandyBridge
cpupower: Introduce idle-set subcommand and C-state enabling/disabling
cpupower: Implement disabling of cstate interface
cpupower: Make idlestate usage unsigned
ACPI / fan: Initialize acpi_state variable
ACPI / scan: remove unused LIST_HEAD(acpi_device_list)
ACPI / dock: Actually define acpi_dock_init() as void
ACPI / PM: Fix corner case in acpi_bus_update_power()
cpufreq: Fix serialization of frequency transitions
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/device_pm.c | 23 | ||||
-rw-r--r-- | drivers/acpi/dock.c | 7 | ||||
-rw-r--r-- | drivers/acpi/fan.c | 2 | ||||
-rw-r--r-- | drivers/acpi/power.c | 4 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 1 |
5 files changed, 24 insertions, 13 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index e9e8bb24785b..4ab807dc8518 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c @@ -324,14 +324,27 @@ int acpi_bus_update_power(acpi_handle handle, int *state_p) if (result) return result; - if (state == ACPI_STATE_UNKNOWN) + if (state == ACPI_STATE_UNKNOWN) { state = ACPI_STATE_D0; - - result = acpi_device_set_power(device, state); - if (!result && state_p) + result = acpi_device_set_power(device, state); + if (result) + return result; + } else { + if (device->power.flags.power_resources) { + /* + * We don't need to really switch the state, bu we need + * to update the power resources' reference counters. + */ + result = acpi_power_transition(device, state); + if (result) + return result; + } + device->power.state = state; + } + if (state_p) *state_p = state; - return result; + return 0; } EXPORT_SYMBOL_GPL(acpi_bus_update_power); diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 14de9f46972e..826560753389 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -1064,10 +1064,10 @@ find_dock_and_bay(acpi_handle handle, u32 lvl, void *context, void **rv) return AE_OK; } -int __init acpi_dock_init(void) +void __init acpi_dock_init(void) { if (acpi_disabled) - return 0; + return; /* look for dock stations and bays */ acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, @@ -1075,11 +1075,10 @@ int __init acpi_dock_init(void) if (!dock_station_count) { pr_info(PREFIX "No dock devices found.\n"); - return 0; + return; } register_acpi_bus_notifier(&dock_acpi_notifier); pr_info(PREFIX "%s: %d docks/bays found\n", ACPI_DOCK_DRIVER_DESCRIPTION, dock_station_count); - return 0; } diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 8d1c0105e113..5b02a0aa540c 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c @@ -84,7 +84,7 @@ static int fan_get_cur_state(struct thermal_cooling_device *cdev, unsigned long { struct acpi_device *device = cdev->devdata; int result; - int acpi_state; + int acpi_state = ACPI_STATE_D0; if (!device) return -EINVAL; diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 288bb270f8ed..5c28c894c0fc 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -279,7 +279,7 @@ static int acpi_power_on_unlocked(struct acpi_power_resource *resource) if (resource->ref_count++) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Power resource [%s] already on", + "Power resource [%s] already on\n", resource->name)); } else { result = __acpi_power_on(resource); @@ -325,7 +325,7 @@ static int acpi_power_off_unlocked(struct acpi_power_resource *resource) if (!resource->ref_count) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Power resource [%s] already off", + "Power resource [%s] already off\n", resource->name)); return 0; } diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index dfe76f17cfc4..10985573aaa7 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -35,7 +35,6 @@ bool acpi_force_hot_remove; static const char *dummy_hid = "device"; -static LIST_HEAD(acpi_device_list); static LIST_HEAD(acpi_bus_id_list); static DEFINE_MUTEX(acpi_scan_lock); static LIST_HEAD(acpi_scan_handlers_list); |