diff options
Diffstat (limited to 'drivers/acpi/acpica/evrgnini.c')
-rw-r--r-- | drivers/acpi/acpica/evrgnini.c | 45 |
1 files changed, 8 insertions, 37 deletions
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c index 284a7becbe9..cf29c495302 100644 --- a/drivers/acpi/acpica/evrgnini.c +++ b/drivers/acpi/acpica/evrgnini.c | |||
@@ -50,8 +50,6 @@ | |||
50 | ACPI_MODULE_NAME("evrgnini") | 50 | ACPI_MODULE_NAME("evrgnini") |
51 | 51 | ||
52 | /* Local prototypes */ | 52 | /* Local prototypes */ |
53 | static u8 acpi_ev_match_pci_root_bridge(char *id); | ||
54 | |||
55 | static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node); | 53 | static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node); |
56 | 54 | ||
57 | /******************************************************************************* | 55 | /******************************************************************************* |
@@ -332,37 +330,6 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, | |||
332 | 330 | ||
333 | /******************************************************************************* | 331 | /******************************************************************************* |
334 | * | 332 | * |
335 | * FUNCTION: acpi_ev_match_pci_root_bridge | ||
336 | * | ||
337 | * PARAMETERS: Id - The HID/CID in string format | ||
338 | * | ||
339 | * RETURN: TRUE if the Id is a match for a PCI/PCI-Express Root Bridge | ||
340 | * | ||
341 | * DESCRIPTION: Determine if the input ID is a PCI Root Bridge ID. | ||
342 | * | ||
343 | ******************************************************************************/ | ||
344 | |||
345 | static u8 acpi_ev_match_pci_root_bridge(char *id) | ||
346 | { | ||
347 | |||
348 | /* | ||
349 | * Check if this is a PCI root. | ||
350 | * ACPI 3.0+: check for a PCI Express root also. | ||
351 | */ | ||
352 | if (!(ACPI_STRNCMP(id, | ||
353 | PCI_ROOT_HID_STRING, | ||
354 | sizeof(PCI_ROOT_HID_STRING))) || | ||
355 | !(ACPI_STRNCMP(id, | ||
356 | PCI_EXPRESS_ROOT_HID_STRING, | ||
357 | sizeof(PCI_EXPRESS_ROOT_HID_STRING)))) { | ||
358 | return (TRUE); | ||
359 | } | ||
360 | |||
361 | return (FALSE); | ||
362 | } | ||
363 | |||
364 | /******************************************************************************* | ||
365 | * | ||
366 | * FUNCTION: acpi_ev_is_pci_root_bridge | 333 | * FUNCTION: acpi_ev_is_pci_root_bridge |
367 | * | 334 | * |
368 | * PARAMETERS: Node - Device node being examined | 335 | * PARAMETERS: Node - Device node being examined |
@@ -377,9 +344,10 @@ static u8 acpi_ev_match_pci_root_bridge(char *id) | |||
377 | static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) | 344 | static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) |
378 | { | 345 | { |
379 | acpi_status status; | 346 | acpi_status status; |
380 | struct acpica_device_id hid; | 347 | struct acpica_device_id *hid; |
381 | struct acpi_compatible_id_list *cid; | 348 | struct acpica_device_id_list *cid; |
382 | u32 i; | 349 | u32 i; |
350 | u8 match; | ||
383 | 351 | ||
384 | /* Get the _HID and check for a PCI Root Bridge */ | 352 | /* Get the _HID and check for a PCI Root Bridge */ |
385 | 353 | ||
@@ -388,7 +356,10 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) | |||
388 | return (FALSE); | 356 | return (FALSE); |
389 | } | 357 | } |
390 | 358 | ||
391 | if (acpi_ev_match_pci_root_bridge(hid.value)) { | 359 | match = acpi_ut_is_pci_root_bridge(hid->string); |
360 | ACPI_FREE(hid); | ||
361 | |||
362 | if (match) { | ||
392 | return (TRUE); | 363 | return (TRUE); |
393 | } | 364 | } |
394 | 365 | ||
@@ -402,7 +373,7 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) | |||
402 | /* Check all _CIDs in the returned list */ | 373 | /* Check all _CIDs in the returned list */ |
403 | 374 | ||
404 | for (i = 0; i < cid->count; i++) { | 375 | for (i = 0; i < cid->count; i++) { |
405 | if (acpi_ev_match_pci_root_bridge(cid->id[i].value)) { | 376 | if (acpi_ut_is_pci_root_bridge(cid->ids[i].string)) { |
406 | ACPI_FREE(cid); | 377 | ACPI_FREE(cid); |
407 | return (TRUE); | 378 | return (TRUE); |
408 | } | 379 | } |