Since Linux commit cdb4f26a63c3 ("kobject: kobj_type: remove
default_attrs"), the deprecated kobj member default_attrs is gone. It is
replaced by default_groups.default_groups is available since 2013, so simply switch to default_groups, without (hopefully) breaking any older kernel. Signed-off-by: Ralf Ramsauer <[email protected]> --- driver/sysfs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/driver/sysfs.c b/driver/sysfs.c index a604afa4..f91d5ac5 100644 --- a/driver/sysfs.c +++ b/driver/sysfs.c @@ -180,10 +180,11 @@ static struct attribute *cell_stats_attrs[] = { #endif NULL }; +ATTRIBUTE_GROUPS(cell_stats); static struct kobj_type cell_stats_type = { .sysfs_ops = &kobj_sysfs_ops, - .default_attrs = cell_stats_attrs, + .default_groups = cell_stats_groups, }; static struct attribute *cpu_stats_attrs[] = { @@ -212,10 +213,11 @@ static struct attribute *cpu_stats_attrs[] = { #endif NULL }; +ATTRIBUTE_GROUPS(cpu_stats); static struct kobj_type cell_cpu_type = { .sysfs_ops = &kobj_sysfs_ops, - .default_attrs = cpu_stats_attrs, + .default_groups = cpu_stats_groups, }; static int print_cpumask(char *buf, size_t size, cpumask_t *mask, bool as_list) @@ -342,11 +344,12 @@ static struct attribute *cell_attrs[] = { &cell_cpus_failed_list_attr.attr, NULL, }; +ATTRIBUTE_GROUPS(cell); static struct kobj_type cell_type = { .release = jailhouse_cell_kobj_release, .sysfs_ops = &kobj_sysfs_ops, - .default_attrs = cell_attrs, + .default_groups = cell_groups, }; static struct cell_cpu *find_cell_cpu(struct cell *cell, unsigned int cpu) -- 2.36.0 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20220426172222.1910982-1-ralf.ramsauer%40oth-regensburg.de.
