#define _GNU_SOURCE #include #include #include #include "cookie.h" static char const *priov[] = { [LOG_EMERG] = "EMERG:", [LOG_ALERT] = "ALERT:", [LOG_CRIT] = "CRIT:", [LOG_ERR] = "ERR:", [LOG_WARNING] = "WARNING:", [LOG_NOTICE] = "NOTICE:", [LOG_INFO] = "INFO:", [LOG_DEBUG] = "DEBUG:", }; static ssize_t cookie_writer(void *cookie, char const *data, size_t leng) { int prio = LOG_DEBUG, len; do { len = strlen(priov[prio]); } while (memcmp(data, priov[prio], len) && --prio >= 0); if (prio < 0) { prio = LOG_INFO; } else { data += len; leng -= len; } while (*data == ' ') { ++data; --leng; } syslog(prio, "%.*s", (int) leng, data); return leng; } static cookie_io_functions_t cookie_log = { .write = cookie_writer, }; void to_std_log(FILE **fp) { setvbuf(*fp = fopencookie(NULL, "w", cookie_log), NULL, _IOLBF, 0); } /a>
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-11-12 15:22:38 +0100
committerMark Brown <broonie@kernel.org>2016-11-13 09:22:37 +0000
commit295070e9aa015abb9b92cccfbb1e43954e938133 (patch)
treed0a08e7ce280bc877e22424437dbe59fa1857d9a /arch/arm/boot
parent1001354ca34179f3db924eb66672442a173147dc (diff)
regulator: stw481x-vmmc: fix ages old enable error
The regulator has never been properly enabled, it has been dormant all the time. It's strange that MMC was working at all, but it likely worked by the signals going through the levelshifter and reaching the card anyways. Fixes: 3615a34ea1a6 ("regulator: add STw481x VMMC driver") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'arch/arm/boot')