cgroup, sched: convert away from cftype->read_map()
[platform/adaptation/renesas_rcar/renesas_kernel.git] / kernel / sched / cpuacct.c
index f64722f..dd88738 100644 (file)
@@ -184,7 +184,7 @@ static const char * const cpuacct_stat_desc[] = {
 };
 
 static int cpuacct_stats_show(struct cgroup_subsys_state *css,
-                             struct cftype *cft, struct cgroup_map_cb *cb)
+                             struct cftype *cft, struct seq_file *sf)
 {
        struct cpuacct *ca = css_ca(css);
        int cpu;
@@ -196,7 +196,7 @@ static int cpuacct_stats_show(struct cgroup_subsys_state *css,
                val += kcpustat->cpustat[CPUTIME_NICE];
        }
        val = cputime64_to_clock_t(val);
-       cb->fill(cb, cpuacct_stat_desc[CPUACCT_STAT_USER], val);
+       seq_printf(sf, "%s %lld\n", cpuacct_stat_desc[CPUACCT_STAT_USER], val);
 
        val = 0;
        for_each_online_cpu(cpu) {
@@ -207,7 +207,7 @@ static int cpuacct_stats_show(struct cgroup_subsys_state *css,
        }
 
        val = cputime64_to_clock_t(val);
-       cb->fill(cb, cpuacct_stat_desc[CPUACCT_STAT_SYSTEM], val);
+       seq_printf(sf, "%s %lld\n", cpuacct_stat_desc[CPUACCT_STAT_SYSTEM], val);
 
        return 0;
 }
@@ -224,7 +224,7 @@ static struct cftype files[] = {
        },
        {
                .name = "stat",
-               .read_map = cpuacct_stats_show,
+               .read_seq_string = cpuacct_stats_show,
        },
        { }     /* terminate */
 };