summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2012-10-30 14:41:07 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-15 00:16:03 +0100
commitccf78040265bfce2aac5766e1ddf4fc3dde36899 (patch)
tree16356f6e990d8c90663c935892d34969464f953d
parentACPI: move acpi_no_s4_hw_signature() declaration into #ifdef CONFIG_HIBERNATION (diff)
downloadlinux-ccf78040265bfce2aac5766e1ddf4fc3dde36899.tar.xz
linux-ccf78040265bfce2aac5766e1ddf4fc3dde36899.zip
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>
-rw-r--r--drivers/acpi/scan.c4
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)
struct acpi_device *acpi_dev = to_acpi_device(dev);
acpi_free_ids(acpi_dev);
+ kfree(acpi_dev->pnp.unique_id);
kfree(acpi_dev);
}
@@ -1211,6 +1212,9 @@ static void acpi_device_set_id(struct acpi_device *device)
device->pnp.bus_address = info->address;
device->flags.bus_address = 1;
}
+ if (info->valid & ACPI_VALID_UID)
+ device->pnp.unique_id = kstrdup(info->unique_id.string,
+ GFP_KERNEL);
kfree(info);