From d3f5d2a192a299f56579ae6e6283f9011b00208f Mon Sep 17 00:00:00 2001 From: Janakarajan Natarajan Date: Tue, 5 Nov 2019 17:16:52 +0000 Subject: 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 Acked-by: Thomas Renninger Signed-off-by: Shuah Khan --- tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c') 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; -- cgit v1.2.3-59-g8ed1b