serial-dmm: Mark serial read/write calls as nonblocking.

This driver opens the port with the SERIAL_NONBLOCK flag so these calls were
already non-blocking.
This commit is contained in:
Martin Ling 2014-09-16 01:58:54 +01:00 committed by Uwe Hermann
parent 02bd1d0298
commit 4277ac349c
2 changed files with 2 additions and 2 deletions

View File

@ -283,7 +283,7 @@ SR_PRIV int sr_metex14_packet_request(struct sr_serial_dev_inst *serial)
sr_spew("Requesting DMM packet.");
return (serial_write(serial, &wbuf, 1) == 1) ? SR_OK : SR_ERR;
return (serial_write_nonblocking(serial, &wbuf, 1) == 1) ? SR_OK : SR_ERR;
}
#endif

View File

@ -110,7 +110,7 @@ static void handle_new_data(struct sr_dev_inst *sdi, int dmm, void *info)
/* 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 == 0)
return; /* No new bytes, nothing to do. */
if (len < 0) {