kernel/riscv64: Fix GetChar data val assignment for sifive uart

Change-Id: I81981d23222f81ee936695c3257e8185a7bcebfd
This commit is contained in:
Alexander von Gluck IV 2021-08-06 12:57:50 -05:00
parent f0e1bca09c
commit cb256af95c

View File

@ -80,7 +80,7 @@ ArchUARTSifive::GetChar(bool wait)
{
UARTSifiveRegs::Rxdata data;
do {
data = { .val = Regs()->rxdata.val };
data.val = Regs()->rxdata.val;
} while (!wait || data.isEmpty);
return data.isEmpty ? -1 : data.data;