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.
This commit is contained in:
parent
9333691aaf
commit
47d98603e7
|
@ -167,7 +167,7 @@ int tondaj_sl_814_receive_data(int fd, int revents, void *cb_data)
|
||||||
devc->state = GET_PACKET;
|
devc->state = GET_PACKET;
|
||||||
} else if (devc->state == GET_PACKET) {
|
} else if (devc->state == GET_PACKET) {
|
||||||
/* Read a packet from the device. */
|
/* 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);
|
4 - devc->buflen);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
sr_err("Error reading packet: %d.", ret);
|
sr_err("Error reading packet: %d.", ret);
|
||||||
|
|
Loading…
Reference in New Issue