Skip to content

Commit 17f1841

Browse files
gregkhrafaeljw
authored andcommitted
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 aa30f47 ("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>
1 parent fc74e0a commit 17f1841

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

drivers/acpi/cppc_acpi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ static struct attribute *cppc_attrs[] = {
179179
&lowest_freq.attr,
180180
NULL
181181
};
182+
ATTRIBUTE_GROUPS(cppc);
182183

183184
static struct kobj_type cppc_ktype = {
184185
.sysfs_ops = &kobj_sysfs_ops,
185-
.default_attrs = cppc_attrs,
186+
.default_groups = cppc_groups,
186187
};
187188

188189
static int check_pcc_chan(int pcc_ss_id, bool chk_err_bit)

drivers/acpi/device_sysfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ static struct attribute *acpi_data_node_default_attrs[] = {
5353
&data_node_path.attr,
5454
NULL
5555
};
56+
ATTRIBUTE_GROUPS(acpi_data_node_default);
5657

5758
#define to_data_node(k) container_of(k, struct acpi_data_node, kobj)
5859
#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)
7980

8081
static struct kobj_type acpi_data_node_ktype = {
8182
.sysfs_ops = &acpi_data_node_sysfs_ops,
82-
.default_attrs = acpi_data_node_default_attrs,
83+
.default_groups = acpi_data_node_default_groups,
8384
.release = acpi_data_node_release,
8485
};
8586

drivers/acpi/sysfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,10 +939,11 @@ static struct attribute *hotplug_profile_attrs[] = {
939939
&hotplug_enabled_attr.attr,
940940
NULL
941941
};
942+
ATTRIBUTE_GROUPS(hotplug_profile);
942943

943944
static struct kobj_type acpi_hotplug_profile_ktype = {
944945
.sysfs_ops = &kobj_sysfs_ops,
945-
.default_attrs = hotplug_profile_attrs,
946+
.default_groups = hotplug_profile_groups,
946947
};
947948

948949
void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug,

0 commit comments

Comments
 (0)