aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThara Gopinath <thara.gopinath@linaro.org>2017-07-14 13:15:48 -0400
committerLisa Nguyen <lisa.nguyen@linaro.org>2017-09-19 12:59:40 -0700
commit1a32ec046dbb85823eeb2fb965a594614473d719 (patch)
tree92c1ccb5a5a90c39c7cc742f3dd95d43c853abbc
parentce1acda61617d3ab02087f97a6b073b460399e32 (diff)
Fix the numbering of display options.
The ordering of the display options was not matching with the order of the windows defined in display.h causing GPIO and CLOCK display to seg fault/not work. This patch fixes this issue. Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
-rw-r--r--display.c2
-rw-r--r--powerdebug.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/display.c b/display.c
index 6b2404e..5665ed5 100644
--- a/display.c
+++ b/display.c
@@ -557,7 +557,7 @@ int display_init(struct powerdebug_options *options)
int i, maxx, maxy;
size_t array_size = sizeof(windata) / sizeof(windata[0]);
- current_win = 1 << (ffs(options->flags & DEFAULT_OPTION) - 1);
+ current_win = (ffs(options->flags & DEFAULT_OPTION) - 1);
signal(SIGWINCH, sigwinch_handler);
diff --git a/powerdebug.h b/powerdebug.h
index 7cf8220..a8073a6 100644
--- a/powerdebug.h
+++ b/powerdebug.h
@@ -21,9 +21,9 @@
#define VERSION "0.7.3"
-#define REGULATOR_OPTION 0x01
-#define SENSOR_OPTION 0x02
-#define CLOCK_OPTION 0x04
+#define CLOCK_OPTION 0x01
+#define REGULATOR_OPTION 0x02
+#define SENSOR_OPTION 0x04
#define GPIO_OPTION 0x08
#define VERBOSE_OPTION 0x1000