ACPICA: Major update for acpi_get_object_info external interface
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / acpi / acpica / utmisc.c
index fbe782348b0bcf0111971398ac0dc752b2f6e92d..9cd65334ca750260d25c106c1da7260f8aa44997 100644 (file)
@@ -118,6 +118,34 @@ const char *acpi_ut_validate_exception(acpi_status status)
        return (ACPI_CAST_PTR(const char, exception));
 }
 
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ut_is_pci_root_bridge
+ *
+ * PARAMETERS:  Id              - The HID/CID in string format
+ *
+ * RETURN:      TRUE if the Id is a match for a PCI/PCI-Express Root Bridge
+ *
+ * DESCRIPTION: Determine if the input ID is a PCI Root Bridge ID.
+ *
+ ******************************************************************************/
+
+u8 acpi_ut_is_pci_root_bridge(char *id)
+{
+
+       /*
+        * Check if this is a PCI root bridge.
+        * ACPI 3.0+: check for a PCI Express root also.
+        */
+       if (!(ACPI_STRCMP(id,
+                         PCI_ROOT_HID_STRING)) ||
+           !(ACPI_STRCMP(id, PCI_EXPRESS_ROOT_HID_STRING))) {
+               return (TRUE);
+       }
+
+       return (FALSE);
+}
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ut_is_aml_table