diff options
author | Rafael J. Wysocki | 2014-05-30 04:26:18 +0200 |
---|---|---|
committer | Rafael J. Wysocki | 2014-05-30 16:04:36 +0200 |
commit | 549e68455c6706796d9d244364dfbf5c575bd1a5 (patch) | |
tree | 2809f36d9fbd4a08fdda59109a018cd5a11f72dc /drivers/acpi | |
parent | 01cd4bac8ce433f125b772e3964886fc12e108c7 (diff) |
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: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/scan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 19d524c5c0c8..ebbd23c94ba2 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -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++) |