[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>

authored by

Rajesh Shah and committed by
Greg Kroah-Hartman
4ce448e5 3fb02738

+6 -6
+5 -6
drivers/acpi/pci_bind.c
··· 61 61 62 62 63 63 /** 64 - * acpi_os_get_pci_id 64 + * acpi_get_pci_id 65 65 * ------------------ 66 66 * This function is used by the ACPI Interpreter (a.k.a. Core Subsystem) 67 67 * to resolve PCI information for ACPI-PCI devices defined in the namespace. 68 68 * This typically occurs when resolving PCI operation region information. 69 69 */ 70 - #ifdef ACPI_FUTURE_USAGE 71 70 acpi_status 72 - acpi_os_get_pci_id ( 71 + acpi_get_pci_id ( 73 72 acpi_handle handle, 74 73 struct acpi_pci_id *id) 75 74 { ··· 77 78 struct acpi_device *device = NULL; 78 79 struct acpi_pci_data *data = NULL; 79 80 80 - ACPI_FUNCTION_TRACE("acpi_os_get_pci_id"); 81 + ACPI_FUNCTION_TRACE("acpi_get_pci_id"); 81 82 82 83 if (!id) 83 84 return_ACPI_STATUS(AE_BAD_PARAMETER); ··· 91 92 } 92 93 93 94 status = acpi_get_data(handle, acpi_pci_data_handler, (void**) &data); 94 - if (ACPI_FAILURE(status) || !data || !data->dev) { 95 + if (ACPI_FAILURE(status) || !data) { 95 96 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 96 97 "Invalid ACPI-PCI context for device %s\n", 97 98 acpi_device_bid(device))); ··· 114 115 115 116 return_ACPI_STATUS(AE_OK); 116 117 } 117 - #endif /* ACPI_FUTURE_USAGE */ 118 + EXPORT_SYMBOL(acpi_get_pci_id); 118 119 119 120 120 121 int
+1
include/acpi/acpi_drivers.h
··· 68 68 69 69 struct pci_bus; 70 70 71 + acpi_status acpi_get_pci_id (acpi_handle handle, struct acpi_pci_id *id); 71 72 int acpi_pci_bind (struct acpi_device *device); 72 73 int acpi_pci_unbind (struct acpi_device *device); 73 74 int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus);