Skip to content

Commit 998e7ea

Browse files
gregkhjwrdegoede
authored andcommitted
platform/x86: intel-uncore-frequency: 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 uncore-frequency 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. Cc: Srinivas Pandruvada <[email protected]> Cc: Hans de Goede <[email protected]> Cc: Mark Gross <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent afca4cb commit 998e7ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/platform/x86/intel/uncore-frequency.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ static struct attribute *uncore_attrs[] = {
225225
&min_freq_khz.attr,
226226
NULL
227227
};
228+
ATTRIBUTE_GROUPS(uncore);
228229

229230
static void uncore_sysfs_entry_release(struct kobject *kobj)
230231
{
@@ -236,7 +237,7 @@ static void uncore_sysfs_entry_release(struct kobject *kobj)
236237
static struct kobj_type uncore_ktype = {
237238
.release = uncore_sysfs_entry_release,
238239
.sysfs_ops = &kobj_sysfs_ops,
239-
.default_attrs = uncore_attrs,
240+
.default_groups = uncore_groups,
240241
};
241242

242243
/* Caller provides protection */

0 commit comments

Comments
 (0)