Commit e38f9ff6 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

ACPI: scan: Do not add device IDs from _CID if _HID is not valid

Section 6.1.2 of ACPI 6.4 explicitly requires _HID to be present for
_CID to be defined, so don't add device IDs from _CID to the device
IDs list of a device if _HID is not valid.

Link: https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#cid-compatible-idSigned-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 13605725
...@@ -1340,11 +1340,11 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp, ...@@ -1340,11 +1340,11 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp,
if (info->valid & ACPI_VALID_HID) { if (info->valid & ACPI_VALID_HID) {
acpi_add_id(pnp, info->hardware_id.string); acpi_add_id(pnp, info->hardware_id.string);
pnp->type.platform_id = 1; pnp->type.platform_id = 1;
} if (info->valid & ACPI_VALID_CID) {
if (info->valid & ACPI_VALID_CID) { cid_list = &info->compatible_id_list;
cid_list = &info->compatible_id_list; for (i = 0; i < cid_list->count; i++)
for (i = 0; i < cid_list->count; i++) acpi_add_id(pnp, cid_list->ids[i].string);
acpi_add_id(pnp, cid_list->ids[i].string); }
} }
if (info->valid & ACPI_VALID_ADR) { if (info->valid & ACPI_VALID_ADR) {
pnp->bus_address = info->address; pnp->bus_address = info->address;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment