aboutsummaryrefslogtreecommitdiff
path: root/powerdebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'powerdebug.c')
-rw-r--r--powerdebug.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/powerdebug.c b/powerdebug.c
index b626b05..b0d2ade 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -93,7 +93,6 @@ int getoptions(int argc, char *argv[], struct powerdebug_options *options)
memset(options, 0, sizeof(*options));
options->ticktime = 10;
- options->selectedwindow = -1;
while (1) {
int optindex = 0;
@@ -106,19 +105,15 @@ int getoptions(int argc, char *argv[], struct powerdebug_options *options)
switch (c) {
case 'r':
options->flags |= REGULATOR_OPTION;
- options->selectedwindow = REGULATOR;
break;
case 's':
options->flags |= SENSOR_OPTION;
- options->selectedwindow = SENSOR;
break;
case 'c':
options->flags |= CLOCK_OPTION;
- options->selectedwindow = CLOCK;
break;
case 'g':
options->flags |= GPIO_OPTION;
- options->selectedwindow = GPIO;
break;
case 'd':
options->flags |= DUMP_OPTION;
@@ -152,9 +147,6 @@ int getoptions(int argc, char *argv[], struct powerdebug_options *options)
if (!(options->flags & DEFAULT_OPTION))
options->flags |= DEFAULT_OPTION;
- if (options->selectedwindow == -1)
- options->selectedwindow = CLOCK;
-
return 0;
}
@@ -177,7 +169,7 @@ static int powerdebug_dump(struct powerdebug_options *options)
static int powerdebug_display(struct powerdebug_options *options)
{
- if (display_init(options->selectedwindow)) {
+ if (display_init(options)) {
printf("failed to initialize display\n");
return -1;
}