platform/x86: intel-uncore-frequency: use default_groups in kobj_type
PATCH 1/1 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 aa30f47cf666 ("kobject: Add support for default attribute groups to kobj_type") so that we can soon get rid of the obsolete default_attrs field.
--- drivers/platform/x86/intel/uncore-frequency.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/x86/intel/uncore-frequency.c +2 -1
@@ -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) {
@@ -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 */
Signature · 1 line
2.34.1
Hi,
Quoted 7 lines · Greg Kroah-Hartman
There are currently 2 ways to create a set of sysfs files for a
kobj_type, through thedefault_attrsfield, and thedefault_groupsfield. Move the uncore-frequency sysfs code to usedefault_groupsfield which has been the preferred way sinceaa30f47cf666("kobject: Add support for default attribute groups tokobj_type") so that we can soon get rid of the obsoletedefault_attrsfield.
Quoted 5 lines
Cc Srinivas Pandruvada <[email protected]>Cc Hans de Goede <[email protected]>Cc Mark Gross <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.
Regards,
Hans
Quoted 26 lines
--- drivers/platform/x86/intel/uncore-frequency.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/platform/x86/intel/uncore-frequency.c +2
-1@@ -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) {@@ -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 */