This call was already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. Partial reads are handled.
/* Try to get as much data as the buffer can hold. */
len = SERIAL_BUFSIZE - devc->buflen;
/* Try to get as much data as the buffer can hold. */
len = SERIAL_BUFSIZE - devc->buflen;
- len = serial_read(serial, devc->buf + devc->buflen, len);
+ len = serial_read_nonblocking(serial, devc->buf + devc->buflen, len);
if (len < 1) {
sr_err("Serial port read error: %d.", len);
return;
if (len < 1) {
sr_err("Serial port read error: %d.", len);
return;