aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c42
1 files changed, 6 insertions, 36 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 5b049cd79553..f3132aa47a69 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -703,9 +703,7 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
703 acpi_status status = 0; 703 acpi_status status = 0;
704 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 704 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
705 union acpi_object *package = NULL; 705 union acpi_object *package = NULL;
706 union acpi_object in_arg[3]; 706 int psw_error;
707 struct acpi_object_list arg_list = { 3, in_arg };
708 acpi_status psw_status = AE_OK;
709 707
710 struct acpi_device_id button_device_ids[] = { 708 struct acpi_device_id button_device_ids[] = {
711 {"PNP0C0D", 0}, 709 {"PNP0C0D", 0},
@@ -737,39 +735,11 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
737 * So it is necessary to call _DSW object first. Only when it is not 735 * So it is necessary to call _DSW object first. Only when it is not
738 * present will the _PSW object used. 736 * present will the _PSW object used.
739 */ 737 */
740 /* 738 psw_error = acpi_device_sleep_wake(device, 0, 0, 0);
741 * Three agruments are needed for the _DSW object. 739 if (psw_error)
742 * Argument 0: enable/disable the wake capabilities 740 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
743 * When _DSW object is called to disable the wake capabilities, maybe 741 "error in _DSW or _PSW evaluation\n"));
744 * the first argument is filled. The value of the other two agruments 742
745 * is meaningless.
746 */
747 in_arg[0].type = ACPI_TYPE_INTEGER;
748 in_arg[0].integer.value = 0;
749 in_arg[1].type = ACPI_TYPE_INTEGER;
750 in_arg[1].integer.value = 0;
751 in_arg[2].type = ACPI_TYPE_INTEGER;
752 in_arg[2].integer.value = 0;
753 psw_status = acpi_evaluate_object(device->handle, "_DSW",
754 &arg_list, NULL);
755 if (ACPI_FAILURE(psw_status) && (psw_status != AE_NOT_FOUND))
756 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "error in evaluate _DSW\n"));
757 /*
758 * When the _DSW object is not present, OSPM will call _PSW object.
759 */
760 if (psw_status == AE_NOT_FOUND) {
761 /*
762 * Only one agruments is required for the _PSW object.
763 * agrument 0: enable/disable the wake capabilities
764 */
765 arg_list.count = 1;
766 in_arg[0].integer.value = 0;
767 psw_status = acpi_evaluate_object(device->handle, "_PSW",
768 &arg_list, NULL);
769 if (ACPI_FAILURE(psw_status) && (psw_status != AE_NOT_FOUND))
770 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "error in "
771 "evaluate _PSW\n"));
772 }
773 /* Power button, Lid switch always enable wakeup */ 743 /* Power button, Lid switch always enable wakeup */
774 if (!acpi_match_device_ids(device, button_device_ids)) 744 if (!acpi_match_device_ids(device, button_device_ids))
775 device->wakeup.flags.run_wake = 1; 745 device->wakeup.flags.run_wake = 1;