diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-28 14:14:23 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-12-28 19:15:41 +0100 |
commit | 17f18417d6da07bbaafce84f80fa25d860b6e6d1 (patch) | |
tree | 6b671b919da0dceebba113cabdf758f05fc79148 /drivers/acpi/device_sysfs.c | |
parent | Linux 5.16-rc7 (diff) | |
download | linux-17f18417d6da07bbaafce84f80fa25d860b6e6d1.tar.xz linux-17f18417d6da07bbaafce84f80fa25d860b6e6d1.zip |
ACPI: sysfs: use default_groups in kobj_type
There are currently 2 ways to create a set of sysfs files for a
kobj_type, through the default_attrs field, and the default_groups
field. Move the ACPI sysfs code to use default_groups field which has
been the preferred way since aa30f47cf666 ("kobject: Add support for
default attribute groups to kobj_type") so that we can soon get rid of
the obsolete default_attrs field.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/device_sysfs.c')
-rw-r--r-- | drivers/acpi/device_sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 61271e61c307..d5d6403ba07b 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c @@ -53,6 +53,7 @@ static struct attribute *acpi_data_node_default_attrs[] = { &data_node_path.attr, NULL }; +ATTRIBUTE_GROUPS(acpi_data_node_default); #define to_data_node(k) container_of(k, struct acpi_data_node, kobj) #define to_attr(a) container_of(a, struct acpi_data_node_attr, attr) @@ -79,7 +80,7 @@ static void acpi_data_node_release(struct kobject *kobj) static struct kobj_type acpi_data_node_ktype = { .sysfs_ops = &acpi_data_node_sysfs_ops, - .default_attrs = acpi_data_node_default_attrs, + .default_groups = acpi_data_node_default_groups, .release = acpi_data_node_release, }; |