Commit 549e6845 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

ACPI / scan: introduce platform_id device PNP type flag

Only certain types of ACPI device objects can be enumerated as
platform devices, so in order to distinguish them from the others
introduce a new ACPI device PNP type flag, platform_id, and set it
for devices with a valid _HID to start with.

This change is based on a Zhang Rui's prototype.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent 01cd4bac
......@@ -1797,8 +1797,10 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp,
return;
}
if (info->valid & ACPI_VALID_HID)
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++)
......
......@@ -233,7 +233,8 @@ struct acpi_hardware_id {
struct acpi_pnp_type {
u32 hardware_id:1;
u32 bus_address:1;
u32 reserved:30;
u32 platform_id:1;
u32 reserved:29;
};
struct acpi_device_pnp {
......
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