parisc: pdc_stable: use default_groups in kobj_type
PATCH 1/1 parisc: pdc_stable: 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 parisc pdc_stable 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/parisc/pdc_stable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/parisc/pdc_stable.c +2 -1
@@ -482,11 +482,12 @@ static struct attribute *paths_subsys_attrs[] = { &paths_attr_layer.attr,NULL , }; +ATTRIBUTE_GROUPS (paths_subsys);/* Specific kobject type for our PDC paths */ static struct kobj_type ktype_pdcspath = { .sysfs_ops = &pdcspath_attr_ops, - .default_attrs = paths_subsys_attrs, + .default_groups = paths_subsys_groups, };/* We hard define the 4 types of path we expect to find */
Signature · 1 line
2.34.1
Quoted 11 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 pariscpdc_stablesysfs 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.Cc "James E.J. Bottomley" <[email protected]>Cc Helge Deller <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Applied.
Thanks!
Helge
Quoted 23 lines
--- drivers/parisc/pdc_stable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/parisc/pdc_stable.c +2
-1@@ -482,11 +482,12 @@ static struct attribute *paths_subsys_attrs[] = { &paths_attr_layer.attr,NULL , }; +ATTRIBUTE_GROUPS (paths_subsys);/* Specific kobject type for our PDC paths */ static struct kobj_type ktype_pdcspath = { .sysfs_ops = &pdcspath_attr_ops, - .default_attrs = paths_subsys_attrs, + .default_groups = paths_subsys_groups, };/* We hard define the 4 types of path we expect to find */