Merge tag 'pci-v6.7-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
[linux-2.6-block.git] / sound / pci / hda / hda_intel.c
index ca765ac4765f4a27b77f81f466b647a9699f068d..508c39bf4610dac246edda64ff76f4c0c2713b12 100644 (file)
@@ -1417,17 +1417,11 @@ static bool atpx_present(void)
        acpi_handle dhandle, atpx_handle;
        acpi_status status;
 
-       while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
-               dhandle = ACPI_HANDLE(&pdev->dev);
-               if (dhandle) {
-                       status = acpi_get_handle(dhandle, "ATPX", &atpx_handle);
-                       if (ACPI_SUCCESS(status)) {
-                               pci_dev_put(pdev);
-                               return true;
-                       }
-               }
-       }
-       while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) {
+       while ((pdev = pci_get_base_class(PCI_BASE_CLASS_DISPLAY, pdev))) {
+               if ((pdev->class != PCI_CLASS_DISPLAY_VGA << 8) &&
+                   (pdev->class != PCI_CLASS_DISPLAY_OTHER << 8))
+                       continue;
+
                dhandle = ACPI_HANDLE(&pdev->dev);
                if (dhandle) {
                        status = acpi_get_handle(dhandle, "ATPX", &atpx_handle);