diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-06-04 19:15:40 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-06-11 19:33:19 -0400 |
commit | 06166780eb53685e72b589814d535d1f9948e761 (patch) | |
tree | c4ba373d19f1755d9e8934c754753f52bc13997b /drivers/acpi/sleep/main.c | |
parent | 28ffb5d3e0b563be5a9639c3a2b42f1a9430454f (diff) |
ACPI PM: acpi_pm_device_sleep_state() cleanup
Get rid of a superfluous acpi_pm_device_sleep_state() parameter. The
only legitimate value of that parameter must be derived from the first
parameter, which is what all the callers already do. (However, this
does not address the fact that ACPI still doesn't set up those flags.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/sleep/main.c')
-rw-r--r-- | drivers/acpi/sleep/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index c3b0cd88d09f..fbd40e96ed14 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -369,8 +369,8 @@ int acpi_suspend(u32 acpi_state) | |||
369 | /** | 369 | /** |
370 | * acpi_pm_device_sleep_state - return preferred power state of ACPI device | 370 | * acpi_pm_device_sleep_state - return preferred power state of ACPI device |
371 | * in the system sleep state given by %acpi_target_sleep_state | 371 | * in the system sleep state given by %acpi_target_sleep_state |
372 | * @dev: device to examine | 372 | * @dev: device to examine; its driver model wakeup flags control |
373 | * @wake: if set, the device should be able to wake up the system | 373 | * whether it should be able to wake up the system |
374 | * @d_min_p: used to store the upper limit of allowed states range | 374 | * @d_min_p: used to store the upper limit of allowed states range |
375 | * Return value: preferred power state of the device on success, -ENODEV on | 375 | * Return value: preferred power state of the device on success, -ENODEV on |
376 | * failure (ie. if there's no 'struct acpi_device' for @dev) | 376 | * failure (ie. if there's no 'struct acpi_device' for @dev) |
@@ -388,7 +388,7 @@ int acpi_suspend(u32 acpi_state) | |||
388 | * via @wake. | 388 | * via @wake. |
389 | */ | 389 | */ |
390 | 390 | ||
391 | int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p) | 391 | int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p) |
392 | { | 392 | { |
393 | acpi_handle handle = DEVICE_ACPI_HANDLE(dev); | 393 | acpi_handle handle = DEVICE_ACPI_HANDLE(dev); |
394 | struct acpi_device *adev; | 394 | struct acpi_device *adev; |
@@ -427,7 +427,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p) | |||
427 | * can wake the system. _S0W may be valid, too. | 427 | * can wake the system. _S0W may be valid, too. |
428 | */ | 428 | */ |
429 | if (acpi_target_sleep_state == ACPI_STATE_S0 || | 429 | if (acpi_target_sleep_state == ACPI_STATE_S0 || |
430 | (wake && adev->wakeup.state.enabled && | 430 | (device_may_wakeup(dev) && adev->wakeup.state.enabled && |
431 | adev->wakeup.sleep_state <= acpi_target_sleep_state)) { | 431 | adev->wakeup.sleep_state <= acpi_target_sleep_state)) { |
432 | acpi_status status; | 432 | acpi_status status; |
433 | 433 | ||