drivers/syslog: Call up_puts instead up_putc one by one

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-07-14 15:52:51 +08:00 committed by Petro Karashchenko
parent 61dff1c125
commit 8254ad9159
1 changed files with 1 additions and 6 deletions

View File

@ -218,14 +218,9 @@ static ssize_t syslog_default_write(FAR struct syslog_channel_s *channel,
{
#if defined(CONFIG_ARCH_LOWPUTC)
static sem_t sem = SEM_INITIALIZER(1);
size_t nwritten;
nxsem_wait(&sem);
for (nwritten = 0; nwritten < buflen; nwritten++)
{
up_putc(buffer[nwritten]);
}
up_puts(buffer);
nxsem_post(&sem);
#endif