#include #include #include #include #include "../../util/debug.h" #include "../helpline.h" #include "../ui.h" #include "../libslang.h" char ui_helpline__last_msg[1024]; bool tui_helpline__set; static void tui_helpline__pop(void) { } static void tui_helpline__push(const char *msg) { const size_t sz = sizeof(ui_helpline__current); SLsmg_gotorc(SLtt_Screen_Rows - 1, 0); SLsmg_set_color(0); SLsmg_write_nstring((char *)msg, SLtt_Screen_Cols); SLsmg_refresh(); strncpy(ui_helpline__current, msg, sz)[sz - 1] = '\0'; } static int tui_helpline__show(const char *format, va_list ap) { int ret; static int backlog; pthread_mutex_lock(&ui__lock); ret = vscnprintf(ui_helpline__last_msg + backlog, sizeof(ui_helpline__last_msg) - backlog, format, ap); backlog += ret; tui_helpline__set = true; if (ui_helpline__last_msg[backlog - 1] == '\n') { ui_helpline__puts(ui_helpline__last_msg); SLsmg_refresh(); backlog = 0; } pthread_mutex_unlock(&ui__lock); return ret; } struct ui_helpline tui_helpline_fns = { .pop = tui_helpline__pop, .push = tui_helpline__push, .show = tui_helpline__show, }; void ui_helpline__init(void) { helpline_fns = &tui_helpline_fns; ui_helpline__puts(" "); } te-remove net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mayer <mmayer@broadcom.com>2016-12-19 12:10:28 -0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-01-27 11:43:49 +0100
commit3c223c19aea85d3dda1416c187915f4a30b04b1f (patch)
tree2d2021f8161db3e9ed38b9a966a225b66dff8e58 /sound/usb/line6/Makefile
parent9b02c54bc951fca884ba5719f42a27e8240965bf (diff)
cpufreq: brcmstb-avs-cpufreq: properly retrieve P-state upon suspend
The AVS GET_PMAP command does return a P-state along with the P-map information. However, that P-state is the initial P-state when the P-map was first downloaded to AVS. It is *not* the current P-state. Therefore, we explicitly retrieve the P-state using the GET_PSTATE command. Signed-off-by: Markus Mayer <mmayer@broadcom.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'sound/usb/line6/Makefile')