@@ -392,7 +392,7 @@ int clock_init(void)
* found in the files. Then print the result to the text based interface
* Return 0 on success, < 0 otherwise
*/
-int read_and_print_clock_info(int hrow, int selected)
+int read_and_print_clock_info(void)
{
if (read_clock_info())
return -1;
@@ -21,8 +21,6 @@
#include "clocks.h"
#include "powerdebug.h"
-static int highlighted_row;
-
void usage(void)
{
printf("Usage: powerdebug [OPTIONS]\n");
@@ -274,23 +272,14 @@ int mainloop(struct powerdebug_options *options,
if (options->selectedwindow == CLOCK) {
- int hrow;
-
if (!cont) {
if (!findparent_ncurses) {
- int command = 0;
- if (enter_hit) {
+ if (enter_hit)
clock_toggle_expanded();
- command = CLOCK_SELECTED;
- }
- if (refreshwin)
- command = REFRESH_WINDOW;
- hrow = read_and_print_clock_info(
- highlighted_row,
- command);
- highlighted_row = hrow;
+
+ read_and_print_clock_info();
enter_hit = false;
} else
find_parents_for_clock(clkname_str,
@@ -30,7 +30,7 @@ enum {CLOCK_SELECTED = 1, REFRESH_WINDOW};
extern int read_and_dump_clock_info(char *clk);
extern void find_parents_for_clock(char *clkname, int complete);
-extern int read_and_print_clock_info(int hrow, int selected);
+extern int read_and_print_clock_info(void);
extern int print_clock_info(int hrow, int selected);
extern void print_string_val(char *name, char *val);
extern void print_clock_header(void);
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- clocks.c | 2 +- powerdebug.c | 17 +++-------------- powerdebug.h | 2 +- 3 files changed, 5 insertions(+), 16 deletions(-)