Skip to content

Commit

Permalink
ACPI: Add _UID support for ACPI devices.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lv Zheng authored and Rafael J. Wysocki committed Nov 14, 2012
1 parent 9743fde commit ccf7804
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit ccf7804

Please sign in to comment.