We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5720821 commit 8688f2fCopy full SHA for 8688f2f
drivers/leds/trigger/ledtrig-activity.c
@@ -57,11 +57,15 @@ static void led_activity_function(struct timer_list *t)
57
curr_used = 0;
58
59
for_each_possible_cpu(i) {
60
- curr_used += kcpustat_cpu(i).cpustat[CPUTIME_USER]
61
- + kcpustat_cpu(i).cpustat[CPUTIME_NICE]
62
- + kcpustat_field(&kcpustat_cpu(i), CPUTIME_SYSTEM, i)
63
- + kcpustat_cpu(i).cpustat[CPUTIME_SOFTIRQ]
64
- + kcpustat_cpu(i).cpustat[CPUTIME_IRQ];
+ struct kernel_cpustat kcpustat;
+
+ kcpustat_cpu_fetch(&kcpustat, i);
+ curr_used += kcpustat.cpustat[CPUTIME_USER]
65
+ + kcpustat.cpustat[CPUTIME_NICE]
66
+ + kcpustat.cpustat[CPUTIME_SYSTEM]
67
+ + kcpustat.cpustat[CPUTIME_SOFTIRQ]
68
+ + kcpustat.cpustat[CPUTIME_IRQ];
69
cpus++;
70
}
71
0 commit comments