From 0714a010ccd12514861eb24411fdb156299658a9 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Sun, 21 Sep 2014 18:33:34 +0100 Subject: [PATCH] gmc-mh-1x-2x: Mark serial read call as nonblocking. This call was already nonblocking since the driver opens the port with the SERIAL_NONBLOCK flag. It only reads one byte, and a zero result is handled appropriately. --- src/hardware/gmc-mh-1x-2x/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/gmc-mh-1x-2x/api.c b/src/hardware/gmc-mh-1x-2x/api.c index 4574dfea..1a969d11 100644 --- a/src/hardware/gmc-mh-1x-2x/api.c +++ b/src/hardware/gmc-mh-1x-2x/api.c @@ -90,7 +90,7 @@ static int read_byte(struct sr_serial_dev_inst *serial, gint64 timeout) int rc = 0; for (;;) { - rc = serial_read(serial, &result, 1); + rc = serial_read_nonblocking(serial, &result, 1); if (rc == 1) { sr_spew("read: 0x%02x/%d", result, result); return result;