brymen-dmm: Mark serial read calls as nonblocking.

The driver opens the port with SERIAL_NONBLOCK so these were already
nonblocking, and are handled appropriately.
This commit is contained in:
Martin Ling 2014-09-16 02:42:26 +01:00 committed by Uwe Hermann
parent 5305266a28
commit 44be13b1f8
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ static void handle_new_data(struct sr_dev_inst *sdi)
/* Try to get as much data as the buffer can hold. */
len = DMM_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;
@ -192,7 +192,7 @@ SR_PRIV int brymen_stream_detect(struct sr_serial_dev_inst *serial,
packet_len = i = ibuf = len = 0;
while (ibuf < maxlen) {
len = serial_read(serial, &buf[ibuf], maxlen - ibuf);
len = serial_read_nonblocking(serial, &buf[ibuf], maxlen - ibuf);
if (len > 0) {
ibuf += len;
sr_spew("Read %d bytes.", len);