cgroup: convert all non-memcg controllers to the new cftype interface
[platform/adaptation/renesas_rcar/renesas_kernel.git] / kernel / sched / core.c
index 4603b9d..afc6d7e 100644 (file)
@@ -7970,13 +7970,9 @@ static struct cftype cpu_files[] = {
                .write_u64 = cpu_rt_period_write_uint,
        },
 #endif
+       { }     /* terminate */
 };
 
-static int cpu_cgroup_populate(struct cgroup_subsys *ss, struct cgroup *cont)
-{
-       return cgroup_add_files(cont, ss, cpu_files, ARRAY_SIZE(cpu_files));
-}
-
 struct cgroup_subsys cpu_cgroup_subsys = {
        .name           = "cpu",
        .create         = cpu_cgroup_create,
@@ -7984,8 +7980,8 @@ struct cgroup_subsys cpu_cgroup_subsys = {
        .can_attach     = cpu_cgroup_can_attach,
        .attach         = cpu_cgroup_attach,
        .exit           = cpu_cgroup_exit,
-       .populate       = cpu_cgroup_populate,
        .subsys_id      = cpu_cgroup_subsys_id,
+       .base_cftypes   = cpu_files,
        .early_init     = 1,
 };
 
@@ -8170,13 +8166,9 @@ static struct cftype files[] = {
                .name = "stat",
                .read_map = cpuacct_stats_show,
        },
+       { }     /* terminate */
 };
 
-static int cpuacct_populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
-{
-       return cgroup_add_files(cgrp, ss, files, ARRAY_SIZE(files));
-}
-
 /*
  * charge this task's execution time to its accounting group.
  *
@@ -8208,7 +8200,7 @@ struct cgroup_subsys cpuacct_subsys = {
        .name = "cpuacct",
        .create = cpuacct_create,
        .destroy = cpuacct_destroy,
-       .populate = cpuacct_populate,
        .subsys_id = cpuacct_subsys_id,
+       .base_cftypes = files,
 };
 #endif /* CONFIG_CGROUP_CPUACCT */