diff options
author | Lv Zheng <lv.zheng@intel.com> | 2012-10-30 09:41:07 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-14 18:16:03 -0500 |
commit | ccf78040265bfce2aac5766e1ddf4fc3dde36899 (patch) | |
tree | 16356f6e990d8c90663c935892d34969464f953d /drivers/acpi/scan.c | |
parent | 9743fdea9f9473cd2440741342a5ed8e19eb51bd (diff) |
ACPI: Add _UID support for ACPI devices.
The _UID object is optional, but is required when the device has no
other way to report a persistent unique device ID.
This patch is required for ACPI 5.0 ACPI enumerated IP cores.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rui Zhang <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 19d3d4a1274a..daa88d527e84 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -381,6 +381,7 @@ static void acpi_device_release(struct device *dev) | |||
381 | struct acpi_device *acpi_dev = to_acpi_device(dev); | 381 | struct acpi_device *acpi_dev = to_acpi_device(dev); |
382 | 382 | ||
383 | acpi_free_ids(acpi_dev); | 383 | acpi_free_ids(acpi_dev); |
384 | kfree(acpi_dev->pnp.unique_id); | ||
384 | kfree(acpi_dev); | 385 | kfree(acpi_dev); |
385 | } | 386 | } |
386 | 387 | ||
@@ -1211,6 +1212,9 @@ static void acpi_device_set_id(struct acpi_device *device) | |||
1211 | device->pnp.bus_address = info->address; | 1212 | device->pnp.bus_address = info->address; |
1212 | device->flags.bus_address = 1; | 1213 | device->flags.bus_address = 1; |
1213 | } | 1214 | } |
1215 | if (info->valid & ACPI_VALID_UID) | ||
1216 | device->pnp.unique_id = kstrdup(info->unique_id.string, | ||
1217 | GFP_KERNEL); | ||
1214 | 1218 | ||
1215 | kfree(info); | 1219 | kfree(info); |
1216 | 1220 | ||