diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-01-06 17:41:27 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-01-12 05:06:01 -0500 |
commit | d57d09a480e1db38eeee7629c81289b00f338a15 (patch) | |
tree | f27bf02ff971673f39b0b7d26dc3f90be0a7138b | |
parent | 86e4e20e8a5301ff7104a4f40f35fd5bee408186 (diff) |
ACPI: Drop device flag wake_capable
The wake_capable ACPI device flag is not necessary, because it is
only used in scan.c for recording the information that _PRW is
present for the given device. That information is only used by
acpi_add_single_object() to decide whether or not to call
acpi_bus_get_wakeup_device_flags(), so the flag may be dropped
if the _PRW check is moved to acpi_bus_get_wakeup_device_flags().
Moreover, acpi_bus_get_wakeup_device_flags() always returns 0,
so it really should be void.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/acpi/scan.c | 26 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 3 |
2 files changed, 10 insertions, 19 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index b5e4dedb497d..b99e62494607 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -815,16 +815,22 @@ static void acpi_bus_set_run_wake_flags(struct acpi_device *device) | |||
815 | !!(event_status & ACPI_EVENT_FLAG_HANDLE); | 815 | !!(event_status & ACPI_EVENT_FLAG_HANDLE); |
816 | } | 816 | } |
817 | 817 | ||
818 | static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device) | 818 | static void acpi_bus_get_wakeup_device_flags(struct acpi_device *device) |
819 | { | 819 | { |
820 | acpi_handle temp; | ||
820 | acpi_status status = 0; | 821 | acpi_status status = 0; |
821 | int psw_error; | 822 | int psw_error; |
822 | 823 | ||
824 | /* Presence of _PRW indicates wake capable */ | ||
825 | status = acpi_get_handle(device->handle, "_PRW", &temp); | ||
826 | if (ACPI_FAILURE(status)) | ||
827 | return; | ||
828 | |||
823 | status = acpi_bus_extract_wakeup_device_power_package(device->handle, | 829 | status = acpi_bus_extract_wakeup_device_power_package(device->handle, |
824 | &device->wakeup); | 830 | &device->wakeup); |
825 | if (ACPI_FAILURE(status)) { | 831 | if (ACPI_FAILURE(status)) { |
826 | ACPI_EXCEPTION((AE_INFO, status, "Extracting _PRW package")); | 832 | ACPI_EXCEPTION((AE_INFO, status, "Extracting _PRW package")); |
827 | goto end; | 833 | return; |
828 | } | 834 | } |
829 | 835 | ||
830 | device->wakeup.flags.valid = 1; | 836 | device->wakeup.flags.valid = 1; |
@@ -840,11 +846,6 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device) | |||
840 | if (psw_error) | 846 | if (psw_error) |
841 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 847 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
842 | "error in _DSW or _PSW evaluation\n")); | 848 | "error in _DSW or _PSW evaluation\n")); |
843 | |||
844 | end: | ||
845 | if (ACPI_FAILURE(status)) | ||
846 | device->flags.wake_capable = 0; | ||
847 | return 0; | ||
848 | } | 849 | } |
849 | 850 | ||
850 | static void acpi_bus_add_power_resource(acpi_handle handle); | 851 | static void acpi_bus_add_power_resource(acpi_handle handle); |
@@ -950,11 +951,6 @@ static int acpi_bus_get_flags(struct acpi_device *device) | |||
950 | if (ACPI_SUCCESS(status)) | 951 | if (ACPI_SUCCESS(status)) |
951 | device->flags.power_manageable = 1; | 952 | device->flags.power_manageable = 1; |
952 | 953 | ||
953 | /* Presence of _PRW indicates wake capable */ | ||
954 | status = acpi_get_handle(device->handle, "_PRW", &temp); | ||
955 | if (ACPI_SUCCESS(status)) | ||
956 | device->flags.wake_capable = 1; | ||
957 | |||
958 | /* TBD: Performance management */ | 954 | /* TBD: Performance management */ |
959 | 955 | ||
960 | return 0; | 956 | return 0; |
@@ -1281,11 +1277,7 @@ static int acpi_add_single_object(struct acpi_device **child, | |||
1281 | * Wakeup device management | 1277 | * Wakeup device management |
1282 | *----------------------- | 1278 | *----------------------- |
1283 | */ | 1279 | */ |
1284 | if (device->flags.wake_capable) { | 1280 | acpi_bus_get_wakeup_device_flags(device); |
1285 | result = acpi_bus_get_wakeup_device_flags(device); | ||
1286 | if (result) | ||
1287 | goto end; | ||
1288 | } | ||
1289 | 1281 | ||
1290 | /* | 1282 | /* |
1291 | * Performance Management | 1283 | * Performance Management |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 20b05cd68663..78ca429929f7 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -148,8 +148,7 @@ struct acpi_device_flags { | |||
148 | u32 suprise_removal_ok:1; | 148 | u32 suprise_removal_ok:1; |
149 | u32 power_manageable:1; | 149 | u32 power_manageable:1; |
150 | u32 performance_manageable:1; | 150 | u32 performance_manageable:1; |
151 | u32 wake_capable:1; /* Wakeup(_PRW) supported? */ | 151 | u32 reserved:24; |
152 | u32 reserved:23; | ||
153 | }; | 152 | }; |
154 | 153 | ||
155 | /* File System */ | 154 | /* File System */ |