Skip to content

Commit 2bdf3f9

Browse files
gregkhmpe
authored andcommitted
powerpc/cacheinfo: 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 powerpc cacheinfo 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 <[email protected]> Reviewed-by: Tyrel Datwyler <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 08035a6 commit 2bdf3f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/powerpc/kernel/cacheinfo.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static struct kobj_attribute cache_shared_cpu_list_attr =
710710
__ATTR(shared_cpu_list, 0444, shared_cpu_list_show, NULL);
711711

712712
/* Attributes which should always be created -- the kobject/sysfs core
713-
* does this automatically via kobj_type->default_attrs. This is the
713+
* does this automatically via kobj_type->default_groups. This is the
714714
* minimum data required to uniquely identify a cache.
715715
*/
716716
static struct attribute *cache_index_default_attrs[] = {
@@ -720,6 +720,7 @@ static struct attribute *cache_index_default_attrs[] = {
720720
&cache_shared_cpu_list_attr.attr,
721721
NULL,
722722
};
723+
ATTRIBUTE_GROUPS(cache_index_default);
723724

724725
/* Attributes which should be created if the cache device node has the
725726
* right properties -- see cacheinfo_create_index_opt_attrs
@@ -738,7 +739,7 @@ static const struct sysfs_ops cache_index_ops = {
738739
static struct kobj_type cache_index_type = {
739740
.release = cache_index_release,
740741
.sysfs_ops = &cache_index_ops,
741-
.default_attrs = cache_index_default_attrs,
742+
.default_groups = cache_index_default_groups,
742743
};
743744

744745
static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir)

0 commit comments

Comments
 (0)