aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/pci_root.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index ca8dba3b40b9..888cb9f5c5fb 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -142,6 +142,30 @@ acpi_handle acpi_get_pci_rootbridge_handle(unsigned int seg, unsigned int bus)
142 142
143EXPORT_SYMBOL_GPL(acpi_get_pci_rootbridge_handle); 143EXPORT_SYMBOL_GPL(acpi_get_pci_rootbridge_handle);
144 144
145/**
146 * acpi_is_root_bridge - determine whether an ACPI CA node is a PCI root bridge
147 * @handle - the ACPI CA node in question.
148 *
149 * Note: we could make this API take a struct acpi_device * instead, but
150 * for now, it's more convenient to operate on an acpi_handle.
151 */
152int acpi_is_root_bridge(acpi_handle handle)
153{
154 int ret;
155 struct acpi_device *device;
156
157 ret = acpi_bus_get_device(handle, &device);
158 if (ret)
159 return 0;
160
161 ret = acpi_match_device_ids(device, root_device_ids);
162 if (ret)
163 return 0;
164 else
165 return 1;
166}
167EXPORT_SYMBOL_GPL(acpi_is_root_bridge);
168
145static acpi_status 169static acpi_status
146get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) 170get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
147{ 171{