diff options
| author | Rajesh Shah <rajesh.shah@intel.com> | 2005-04-28 03:25:53 -0400 | 
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-28 00:52:42 -0400 | 
| commit | 4ce448e5fae62689b06027b46f470b944e5c2193 (patch) | |
| tree | 9edaa688203e649f63362f354d62d6a663da54b8 | |
| parent | 3fb02738b0fd36f47710a2bf207129efd2f5daa2 (diff) | |
[PATCH] acpi bridge hotadd: Export the interface to get PCI id for an ACPI handle
Export an acpi interface to get PCI domain/bus/devfn information from the
corresponding namespace handle.  Used by acpiphp code to transpate the device
handle of the hot-plugged root bridge to the corresponding pci location
information.
Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| -rw-r--r-- | drivers/acpi/pci_bind.c | 11 | ||||
| -rw-r--r-- | include/acpi/acpi_drivers.h | 1 | 
2 files changed, 6 insertions, 6 deletions
| diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c index 7753df1f9fb8..5148f3c10b5c 100644 --- a/drivers/acpi/pci_bind.c +++ b/drivers/acpi/pci_bind.c | |||
| @@ -61,15 +61,14 @@ acpi_pci_data_handler ( | |||
| 61 | 61 | ||
| 62 | 62 | ||
| 63 | /** | 63 | /** | 
| 64 | * acpi_os_get_pci_id | 64 | * acpi_get_pci_id | 
| 65 | * ------------------ | 65 | * ------------------ | 
| 66 | * This function is used by the ACPI Interpreter (a.k.a. Core Subsystem) | 66 | * This function is used by the ACPI Interpreter (a.k.a. Core Subsystem) | 
| 67 | * to resolve PCI information for ACPI-PCI devices defined in the namespace. | 67 | * to resolve PCI information for ACPI-PCI devices defined in the namespace. | 
| 68 | * This typically occurs when resolving PCI operation region information. | 68 | * This typically occurs when resolving PCI operation region information. | 
| 69 | */ | 69 | */ | 
| 70 | #ifdef ACPI_FUTURE_USAGE | ||
| 71 | acpi_status | 70 | acpi_status | 
| 72 | acpi_os_get_pci_id ( | 71 | acpi_get_pci_id ( | 
| 73 | acpi_handle handle, | 72 | acpi_handle handle, | 
| 74 | struct acpi_pci_id *id) | 73 | struct acpi_pci_id *id) | 
| 75 | { | 74 | { | 
| @@ -78,7 +77,7 @@ acpi_os_get_pci_id ( | |||
| 78 | struct acpi_device *device = NULL; | 77 | struct acpi_device *device = NULL; | 
| 79 | struct acpi_pci_data *data = NULL; | 78 | struct acpi_pci_data *data = NULL; | 
| 80 | 79 | ||
| 81 | ACPI_FUNCTION_TRACE("acpi_os_get_pci_id"); | 80 | ACPI_FUNCTION_TRACE("acpi_get_pci_id"); | 
| 82 | 81 | ||
| 83 | if (!id) | 82 | if (!id) | 
| 84 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 83 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 
| @@ -92,7 +91,7 @@ acpi_os_get_pci_id ( | |||
| 92 | } | 91 | } | 
| 93 | 92 | ||
| 94 | status = acpi_get_data(handle, acpi_pci_data_handler, (void**) &data); | 93 | status = acpi_get_data(handle, acpi_pci_data_handler, (void**) &data); | 
| 95 | if (ACPI_FAILURE(status) || !data || !data->dev) { | 94 | if (ACPI_FAILURE(status) || !data) { | 
| 96 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 95 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 
| 97 | "Invalid ACPI-PCI context for device %s\n", | 96 | "Invalid ACPI-PCI context for device %s\n", | 
| 98 | acpi_device_bid(device))); | 97 | acpi_device_bid(device))); | 
| @@ -115,7 +114,7 @@ acpi_os_get_pci_id ( | |||
| 115 | 114 | ||
| 116 | return_ACPI_STATUS(AE_OK); | 115 | return_ACPI_STATUS(AE_OK); | 
| 117 | } | 116 | } | 
| 118 | #endif /* ACPI_FUTURE_USAGE */ | 117 | EXPORT_SYMBOL(acpi_get_pci_id); | 
| 119 | 118 | ||
| 120 | 119 | ||
| 121 | int | 120 | int | 
| diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index c62e92ec43b2..4ec722d73381 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
| @@ -68,6 +68,7 @@ void acpi_pci_irq_del_prt (int segment, int bus); | |||
| 68 | 68 | ||
| 69 | struct pci_bus; | 69 | struct pci_bus; | 
| 70 | 70 | ||
| 71 | acpi_status acpi_get_pci_id (acpi_handle handle, struct acpi_pci_id *id); | ||
| 71 | int acpi_pci_bind (struct acpi_device *device); | 72 | int acpi_pci_bind (struct acpi_device *device); | 
| 72 | int acpi_pci_unbind (struct acpi_device *device); | 73 | int acpi_pci_unbind (struct acpi_device *device); | 
| 73 | int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus); | 74 | int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus); | 
