Skip to content

Commit

Permalink
ia64: topology: use default_groups in kobj_type
Browse files Browse the repository at this point in the history
There are currently two ways to create a set of sysfs files for a kobj_type,
through the default_attrs field, and the default_groups field.

Move the ia64 topology 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.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: David Hildenbrand <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
gregkh authored and torvalds committed Jan 15, 2022
1 parent c5c2135 commit a7eddfc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/ia64/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ static struct attribute * cache_default_attrs[] = {
&shared_cpu_map.attr,
NULL
};
ATTRIBUTE_GROUPS(cache_default);

#define to_object(k) container_of(k, struct cache_info, kobj)
#define to_attr(a) container_of(a, struct cache_attr, attr)
Expand All @@ -284,7 +285,7 @@ static const struct sysfs_ops cache_sysfs_ops = {

static struct kobj_type cache_ktype = {
.sysfs_ops = &cache_sysfs_ops,
.default_attrs = cache_default_attrs,
.default_groups = cache_default_groups,
};

static struct kobj_type cache_ktype_percpu_entry = {
Expand Down

0 comments on commit a7eddfc

Please sign in to comment.