aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
diff options
context:
space:
mode:
authorJanakarajan Natarajan <Janakarajan.Natarajan@amd.com>2019-11-05 17:16:52 +0000
committerShuah Khan <skhan@linuxfoundation.org>2019-11-05 17:22:01 -0700
commitd3f5d2a192a299f56579ae6e6283f9011b00208f (patch)
treeb56c121395ac84b7ad814b88bdb342621b426e47 /tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
parentcpupower : Handle set and info subcommands correctly (diff)
downloadlinux-dev-d3f5d2a192a299f56579ae6e6283f9011b00208f.tar.xz
linux-dev-d3f5d2a192a299f56579ae6e6283f9011b00208f.zip
cpupower: Move needs_root variable into a sub-struct
Move the needs_root variable into a sub-struct. This is in preparation for adding a new flag for cpuidle_monitor. Update all uses of the needs_root variable to reflect this change. Signed-off-by: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com> Acked-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c')
-rw-r--r--tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
index d3c3e6e7aa26..6d44fec55ad5 100644
--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
+++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
@@ -408,7 +408,7 @@ int cmd_monitor(int argc, char **argv)
dprint("Try to register: %s\n", all_monitors[num]->name);
test_mon = all_monitors[num]->do_register();
if (test_mon) {
- if (test_mon->needs_root && !run_as_root) {
+ if (test_mon->flags.needs_root && !run_as_root) {
fprintf(stderr, _("Available monitor %s needs "
"root access\n"), test_mon->name);
continue;