diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-12-22 18:02:54 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-03 07:09:41 -0500 |
commit | 38a9a67a281eeebcd7cccf87f0e371f58ae625e3 (patch) | |
tree | 91f8dd1862d8f46739d01d89299eed82fe3a6545 /drivers/acpi/pci_root.c | |
parent | d2e5f0c16ad60a7208fd371233e63b73c990ece2 (diff) |
ACPI / PCI: Move the _PRT setup and cleanup code to pci-acpi.c
Move the code related to _PRT setup and removal and to power
resources from acpi_pci_bind() and acpi_pci_unbind() to the .setup()
and .cleanup() callbacks in acpi_pci_bus and remove acpi_pci_bind()
and acpi_pci_unbind() that have no purpose any more. Accordingly,
remove the code related to device .bind() and .unbind() operations
from the ACPI PCI root bridge driver.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r-- | drivers/acpi/pci_root.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 0e593a203ff8..22a8458b4ec9 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -186,21 +186,6 @@ static acpi_status try_get_root_bridge_busnr(acpi_handle handle, | |||
186 | return AE_OK; | 186 | return AE_OK; |
187 | } | 187 | } |
188 | 188 | ||
189 | static void acpi_pci_bridge_scan(struct acpi_device *device) | ||
190 | { | ||
191 | int status; | ||
192 | struct acpi_device *child = NULL; | ||
193 | |||
194 | if (device->flags.bus_address) | ||
195 | if (device->parent && device->parent->ops.bind) { | ||
196 | status = device->parent->ops.bind(device); | ||
197 | if (!status) { | ||
198 | list_for_each_entry(child, &device->children, node) | ||
199 | acpi_pci_bridge_scan(child); | ||
200 | } | ||
201 | } | ||
202 | } | ||
203 | |||
204 | static u8 pci_osc_uuid_str[] = "33DB4D5B-1FF7-401C-9657-7441C03DD766"; | 189 | static u8 pci_osc_uuid_str[] = "33DB4D5B-1FF7-401C-9657-7441C03DD766"; |
205 | 190 | ||
206 | static acpi_status acpi_pci_run_osc(acpi_handle handle, | 191 | static acpi_status acpi_pci_run_osc(acpi_handle handle, |
@@ -450,7 +435,6 @@ static int acpi_pci_root_add(struct acpi_device *device) | |||
450 | int result; | 435 | int result; |
451 | struct acpi_pci_root *root; | 436 | struct acpi_pci_root *root; |
452 | acpi_handle handle; | 437 | acpi_handle handle; |
453 | struct acpi_device *child; | ||
454 | struct acpi_pci_driver *driver; | 438 | struct acpi_pci_driver *driver; |
455 | u32 flags, base_flags; | 439 | u32 flags, base_flags; |
456 | bool is_osc_granted = false; | 440 | bool is_osc_granted = false; |
@@ -602,21 +586,6 @@ static int acpi_pci_root_add(struct acpi_device *device) | |||
602 | goto out_del_root; | 586 | goto out_del_root; |
603 | } | 587 | } |
604 | 588 | ||
605 | /* | ||
606 | * Attach ACPI-PCI Context | ||
607 | * ----------------------- | ||
608 | * Thus binding the ACPI and PCI devices. | ||
609 | */ | ||
610 | result = acpi_pci_bind_root(device); | ||
611 | if (result) | ||
612 | goto out_del_root; | ||
613 | |||
614 | /* | ||
615 | * Scan and bind all _ADR-Based Devices | ||
616 | */ | ||
617 | list_for_each_entry(child, &device->children, node) | ||
618 | acpi_pci_bridge_scan(child); | ||
619 | |||
620 | /* ASPM setting */ | 589 | /* ASPM setting */ |
621 | if (is_osc_granted) { | 590 | if (is_osc_granted) { |
622 | if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) | 591 | if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) |