aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/cpupower/utils/cpuidle-set.c
diff options
context:
space:
mode:
authorSriram Raghunathan <sriram@marirs.net.in>2015-10-23 09:52:45 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-11-02 02:28:59 +0100
commit57ab3b08725163bfe385aaeea6837f9b1213af3d (patch)
treeae161ce58eae6922ed2617c29d208c4fceb99012 /tools/power/cpupower/utils/cpuidle-set.c
parentcpupower: Enable disabled Cstates if they are below max latency (diff)
downloadlinux-dev-57ab3b08725163bfe385aaeea6837f9b1213af3d.tar.xz
linux-dev-57ab3b08725163bfe385aaeea6837f9b1213af3d.zip
Creating a common structure initialization pattern for struct option
This patch tries to creates a common structure initialization within the cpupower tool. Previously the ``struct option`` was initialized using `designated initializer` technique which was not needed. There were conflicting initialization methods seen with bench/main.c & others. Signed-off-by: Sriram Raghunathan <sriram@marirs.net.in> Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/power/cpupower/utils/cpuidle-set.c')
-rw-r--r--tools/power/cpupower/utils/cpuidle-set.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/tools/power/cpupower/utils/cpuidle-set.c b/tools/power/cpupower/utils/cpuidle-set.c
index eaea1301e29b..d6b6ae44b8c2 100644
--- a/tools/power/cpupower/utils/cpuidle-set.c
+++ b/tools/power/cpupower/utils/cpuidle-set.c
@@ -13,15 +13,11 @@
#include "helpers/sysfs.h"
static struct option info_opts[] = {
- { .name = "disable",
- .has_arg = required_argument, .flag = NULL, .val = 'd'},
- { .name = "enable",
- .has_arg = required_argument, .flag = NULL, .val = 'e'},
- { .name = "disable-by-latency",
- .has_arg = required_argument, .flag = NULL, .val = 'D'},
- { .name = "enable-all",
- .has_arg = no_argument, .flag = NULL, .val = 'E'},
- { },
+ {"disable", required_argument, NULL, 'd'},
+ {"enable", required_argument, NULL, 'e'},
+ {"disable-by-latency", required_argument, NULL, 'D'},
+ {"enable-all", no_argument, NULL, 'E'},
+ { },
};