From 47d98603e706e8c4f2da2b031f31c6dd2cc3b246 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Sun, 21 Sep 2014 19:19:51 +0100 Subject: [PATCH] tondaj-sl-814: Mark serial read call as nonblocking. This call was already nonblocking since the driver opens the port with the SERIAL_NONBLOCK flag. Partial reads are handled. --- src/hardware/tondaj-sl-814/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/tondaj-sl-814/protocol.c b/src/hardware/tondaj-sl-814/protocol.c index feeec69a..b4deee13 100644 --- a/src/hardware/tondaj-sl-814/protocol.c +++ b/src/hardware/tondaj-sl-814/protocol.c @@ -167,7 +167,7 @@ int tondaj_sl_814_receive_data(int fd, int revents, void *cb_data) devc->state = GET_PACKET; } else if (devc->state == GET_PACKET) { /* Read a packet from the device. */ - ret = serial_read(serial, devc->buf + devc->buflen, + ret = serial_read_nonblocking(serial, devc->buf + devc->buflen, 4 - devc->buflen); if (ret < 0) { sr_err("Error reading packet: %d.", ret);