From: Martin Ling Date: Sun, 21 Sep 2014 17:52:20 +0000 (+0100) Subject: mic-985xx: Mark serial read as nonblocking. X-Git-Tag: libsigrok-0.4.0~954 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=98842e53eb5440b508f40d94af38ff003673c567;p=libsigrok.git mic-985xx: Mark serial read as nonblocking. This call was already nonblocking since the driver opens the port with the SERIAL_NONBLOCK flag. Partial reads are handled. --- diff --git a/src/hardware/mic-985xx/protocol.c b/src/hardware/mic-985xx/protocol.c index ce5f0209..3a133ca7 100644 --- a/src/hardware/mic-985xx/protocol.c +++ b/src/hardware/mic-985xx/protocol.c @@ -154,7 +154,7 @@ static void handle_new_data(struct sr_dev_inst *sdi, int idx) /* 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;