From ae95ffebfa0d8c0992332b33631a26d898957b34 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Sun, 2 Dec 2012 12:43:37 -0600 Subject: [PATCH] radioshack-dmm: Fix opening of serial port. During scan the serial port is opened with SERIAL_RDONLY | SERIAL_NONBLOCK, which works fine, but when acquisition starts, it is opened only with SERIAL_RDONLY. On Linux, if cdc_acm can make a claim to the USB to serial converter, opening the port will fail. Open port with SERIAL_RDONLY | SERIAL_NONBLOCK. Signed-off-by: Alexandru Gagniuc --- hardware/radioshack-dmm/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/radioshack-dmm/api.c b/hardware/radioshack-dmm/api.c index 47620e3c..789685dd 100644 --- a/hardware/radioshack-dmm/api.c +++ b/hardware/radioshack-dmm/api.c @@ -217,7 +217,7 @@ static int hw_dev_open(struct sr_dev_inst *sdi) return SR_ERR_BUG; } - if (serial_open(devc->serial, SERIAL_RDONLY) != SR_OK) + if (serial_open(devc->serial, SERIAL_RDONLY | SERIAL_NONBLOCK) != SR_OK) return SR_ERR; sdi->status = SR_ST_ACTIVE;