All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: Add _UID support for ACPI devices.
@ 2012-09-27  1:17 Lv Zheng
  2012-09-27  1:33 ` Zhang Rui
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Lv Zheng @ 2012-09-27  1:17 UTC (permalink / raw)
  To: Linux ACPI; +Cc: Len Brown, Robert Moore, Ying Huang, Rui Zhang, Lv Zheng

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>
---
 drivers/acpi/scan.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index d730a93..bb7fe47 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -327,6 +327,8 @@ static void acpi_device_release(struct device *dev)
 	struct acpi_device *acpi_dev = to_acpi_device(dev);
 
 	acpi_free_ids(acpi_dev);
+	if (acpi_dev->pnp.unique_id)
+		kfree(acpi_dev->pnp.unique_id);
 	kfree(acpi_dev);
 }
 
@@ -1162,6 +1164,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);
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-09-28  0:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27  1:17 [PATCH] ACPI: Add _UID support for ACPI devices Lv Zheng
2012-09-27  1:33 ` Zhang Rui
2012-09-27  1:40 ` [PATCH] ACPI: Add identification objects' user interface Lv Zheng
2012-09-27  1:45   ` Zhang Rui
2012-09-27  5:05     ` Zheng, Lv
2012-09-27  5:02 ` [RESEND PATCH] ACPI: Add _UID support for ACPI devices Lv Zheng
2012-09-28  0:39 ` [PATCH v2 0/2] ACPI: Add userland visibility for identification objects Lv Zheng
2012-09-28  0:40   ` [PATCH v2 1/2] ACPI: Add _UID support for ACPI devices Lv Zheng
2012-09-28  0:40   ` [PATCH v2 2/2] ACPI: Add identification objects' user interface Lv Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.