]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "ACPI: scan: Do not add device IDs from _CID if _HID is not valid"
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 16 Mar 2022 10:23:05 +0000 (11:23 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 16 Mar 2022 10:23:05 +0000 (11:23 +0100)
Revert commit 1f4f5d3fe133 ("ACPI: scan: Do not add device IDs from _CID
if _HID is not valid"), because it has introduced regressions on
multiple systems, even though it only has effect on clearly invalid
firmware.

Reported-by: Pierre-Louis Bossart <notifications@github.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c

index 1331756d4cfce0613d20cebebc4b059bd455c842..8b2e5ef155595e5222a2cf9ab4b461143f82327d 100644 (file)
@@ -1377,11 +1377,11 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp,
                if (info->valid & ACPI_VALID_HID) {
                        acpi_add_id(pnp, info->hardware_id.string);
                        pnp->type.platform_id = 1;
-                       if (info->valid & ACPI_VALID_CID) {
-                               cid_list = &info->compatible_id_list;
-                               for (i = 0; i < cid_list->count; i++)
-                                       acpi_add_id(pnp, cid_list->ids[i].string);
-                       }
+               }
+               if (info->valid & ACPI_VALID_CID) {
+                       cid_list = &info->compatible_id_list;
+                       for (i = 0; i < cid_list->count; i++)
+                               acpi_add_id(pnp, cid_list->ids[i].string);
                }
                if (info->valid & ACPI_VALID_ADR) {
                        pnp->bus_address = info->address;