Commit 5f70fd18 authored by Raag Jadav's avatar Raag Jadav Committed by Rafael J. Wysocki

ACPI: sysfs: use acpi_device_uid() for fetching _UID

Convert manual _UID references to use the standard ACPI helper.
Signed-off-by: default avatarRaag Jadav <raag.jadav@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 58720809
...@@ -410,7 +410,7 @@ static ssize_t uid_show(struct device *dev, ...@@ -410,7 +410,7 @@ static ssize_t uid_show(struct device *dev,
{ {
struct acpi_device *acpi_dev = to_acpi_device(dev); struct acpi_device *acpi_dev = to_acpi_device(dev);
return sprintf(buf, "%s\n", acpi_dev->pnp.unique_id); return sprintf(buf, "%s\n", acpi_device_uid(acpi_dev));
} }
static DEVICE_ATTR_RO(uid); static DEVICE_ATTR_RO(uid);
...@@ -554,7 +554,7 @@ int acpi_device_setup_files(struct acpi_device *dev) ...@@ -554,7 +554,7 @@ int acpi_device_setup_files(struct acpi_device *dev)
if (dev->pnp.type.bus_address) if (dev->pnp.type.bus_address)
result = device_create_file(&dev->dev, &dev_attr_adr); result = device_create_file(&dev->dev, &dev_attr_adr);
if (dev->pnp.unique_id) if (acpi_device_uid(dev))
result = device_create_file(&dev->dev, &dev_attr_uid); result = device_create_file(&dev->dev, &dev_attr_uid);
if (acpi_has_method(dev->handle, "_SUN")) { if (acpi_has_method(dev->handle, "_SUN")) {
...@@ -635,7 +635,7 @@ void acpi_device_remove_files(struct acpi_device *dev) ...@@ -635,7 +635,7 @@ void acpi_device_remove_files(struct acpi_device *dev)
if (acpi_has_method(dev->handle, "_HRV")) if (acpi_has_method(dev->handle, "_HRV"))
device_remove_file(&dev->dev, &dev_attr_hrv); device_remove_file(&dev->dev, &dev_attr_hrv);
if (dev->pnp.unique_id) if (acpi_device_uid(dev))
device_remove_file(&dev->dev, &dev_attr_uid); device_remove_file(&dev->dev, &dev_attr_uid);
if (dev->pnp.type.bus_address) if (dev->pnp.type.bus_address)
device_remove_file(&dev->dev, &dev_attr_adr); device_remove_file(&dev->dev, &dev_attr_adr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment