diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-16 20:25:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-16 20:25:46 -0400 |
commit | dc7c65db2845a8d17432d89252c4227a9a7cb15f (patch) | |
tree | 79030b0aaaafc04bc4303c21495134e744afc058 /drivers/acpi/scan.c | |
parent | 8a0ca91e1db5de5eb5b18cfa919d52ff8be375af (diff) | |
parent | 58b6e5538460be358fdf1286d9a2fbcfcc2cfaba (diff) |
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (72 commits)
Revert "x86/PCI: ACPI based PCI gap calculation"
PCI: remove unnecessary volatile in PCIe hotplug struct controller
x86/PCI: ACPI based PCI gap calculation
PCI: include linux/pm_wakeup.h for device_set_wakeup_capable
PCI PM: Fix pci_prepare_to_sleep
x86/PCI: Fix PCI config space for domains > 0
Fix acpi_pm_device_sleep_wake() by providing a stub for CONFIG_PM_SLEEP=n
PCI: Simplify PCI device PM code
PCI PM: Introduce pci_prepare_to_sleep and pci_back_from_sleep
PCI ACPI: Rework PCI handling of wake-up
ACPI: Introduce new device wakeup flag 'prepared'
ACPI: Introduce acpi_device_sleep_wake function
PCI: rework pci_set_power_state function to call platform first
PCI: Introduce platform_pci_power_manageable function
ACPI: Introduce acpi_bus_power_manageable function
PCI: make pci_name use dev_name
PCI: handle pci_name() being const
PCI: add stub for pci_set_consistent_dma_mask()
PCI: remove unused arch pcibios_update_resource() functions
PCI: fix pci_setup_device()'s sprinting into a const buffer
...
Fixed up conflicts in various files (arch/x86/kernel/setup_64.c,
arch/x86/pci/irq.c, arch/x86/pci/pci.h, drivers/acpi/sleep/main.c,
drivers/pci/pci.c, drivers/pci/pci.h, include/acpi/acpi_bus.h) from x86
and ACPI updates manually.
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 42 |
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; |