Message ID | 20231020084732.17130-4-raag.jadav@intel.com |
---|---|
State | Accepted |
Commit | 5f70fd1892e7a0c94a99c1ad2d0656fc43c1712c |
Headers | show |
Series | Refine _UID references across kernel | expand |
On Fri, Oct 20, 2023 at 10:48 AM Raag Jadav <raag.jadav@intel.com> wrote: > > Convert manual _UID references to use standard ACPI helpers. > > Signed-off-by: Raag Jadav <raag.jadav@intel.com> > --- > drivers/acpi/device_sysfs.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c > index b9bbf0746199..9d8e90744cb5 100644 > --- a/drivers/acpi/device_sysfs.c > +++ b/drivers/acpi/device_sysfs.c > @@ -410,7 +410,7 @@ static ssize_t uid_show(struct 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); > > @@ -554,7 +554,7 @@ int acpi_device_setup_files(struct acpi_device *dev) > > if (dev->pnp.type.bus_address) > 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); > > if (acpi_has_method(dev->handle, "_SUN")) { > @@ -635,7 +635,7 @@ void acpi_device_remove_files(struct acpi_device *dev) > if (acpi_has_method(dev->handle, "_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); > if (dev->pnp.type.bus_address) > device_remove_file(&dev->dev, &dev_attr_adr); > -- Applied as 6.7 material, thanks!
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index b9bbf0746199..9d8e90744cb5 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c @@ -410,7 +410,7 @@ static ssize_t uid_show(struct 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); @@ -554,7 +554,7 @@ int acpi_device_setup_files(struct acpi_device *dev) if (dev->pnp.type.bus_address) 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); if (acpi_has_method(dev->handle, "_SUN")) { @@ -635,7 +635,7 @@ void acpi_device_remove_files(struct acpi_device *dev) if (acpi_has_method(dev->handle, "_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); if (dev->pnp.type.bus_address) device_remove_file(&dev->dev, &dev_attr_adr);
Convert manual _UID references to use standard ACPI helpers. Signed-off-by: Raag Jadav <raag.jadav@intel.com> --- drivers/acpi/device_sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)