Merge tag 'sound-6.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[linux-2.6-microblaze.git] / sound / pci / hda / hda_intel.c
index e871afe..db90feb 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);
@@ -2141,6 +2135,9 @@ static int azx_probe(struct pci_dev *pci,
        if (chip->driver_caps & AZX_DCAPS_I915_COMPONENT) {
                err = snd_hdac_i915_init(azx_bus(chip));
                if (err < 0) {
+                       if (err == -EPROBE_DEFER)
+                               goto out_free;
+
                        /* if the controller is bound only with HDMI/DP
                         * (for HSW and BDW), we need to abort the probe;
                         * for other chips, still continue probing as other