Skip to content

Commit

Permalink
platform/x86: intel-uncore-frequency: use default_groups in kobj_type
Browse files Browse the repository at this point in the history
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 <srinivas.pandruvada@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <markgross@kernel.org>
Cc: platform-driver-x86@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211229141454.2552950-1-gregkh@linuxfoundation.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Greg Kroah-Hartman authored and Hans de Goede committed Dec 30, 2021
1 parent afca4cb commit 998e7ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/platform/x86/intel/uncore-frequency.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ static struct attribute *uncore_attrs[] = {
&min_freq_khz.attr,
NULL
};
ATTRIBUTE_GROUPS(uncore);

static void uncore_sysfs_entry_release(struct kobject *kobj)
{
Expand All @@ -236,7 +237,7 @@ static void uncore_sysfs_entry_release(struct kobject *kobj)
static struct kobj_type uncore_ktype = {
.release = uncore_sysfs_entry_release,
.sysfs_ops = &kobj_sysfs_ops,
.default_attrs = uncore_attrs,
.default_groups = uncore_groups,
};

/* Caller provides protection */
Expand Down

0 comments on commit 998e7ea

Please sign in to comment.