Fix display error on screen
The previous patch was reverted and is replaced by this one.
Instead of dancing around with global flag telling if a subsys succeed
or not and write a error, let's try to initialize the subsystem each
time a display is requested and output an error occurs.
That makes the code a bit nicer and give the opportunity to fix the
problem at the system level (eg. mount debugfs) without restarting
powerdebug.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
diff --git a/display.h b/display.h
index 46095cb..6083c53 100644
--- a/display.h
+++ b/display.h
@@ -34,6 +34,8 @@
extern int display_print_line(int window, int line, char *str,
int bold, void *data);
+extern int display_print_error(int window, int line, char *str);
+
extern int display_refresh_pad(int window);
extern int display_reset_cursor(int window);
extern void *display_get_row_data(int window);