ACPI: sysfs: manage attributes as attribute_group
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 9 Jul 2024 20:37:26 +0000 (22:37 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 2 Aug 2024 14:44:22 +0000 (16:44 +0200)
commitf6bae04a40f4441c62f4f8cd3bbe0ecf8b54033e
tree2c174d1c7cb2d6c08df2b713fdc7a55c1cdeece4
parent52831d9bbc9aa029aed525dfbe61cb78c1db991c
ACPI: sysfs: manage attributes as attribute_group

The current manual attribute management is inconsistent and brittle.

Not all return values of device_create_file() are checked and the
cleanup logic needs to be kept up to date manually.

Moving all attributes into an attribute_group and using the is_visible()
callback allows the management of all attributes as a single unit.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240709-acpi-sysfs-groups-v2-3-058ab0667fa8@weissschuh.net
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/device_sysfs.c