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 <mr.nuke.me@gmail.com>
This commit is contained in:
parent
d5ce233fe1
commit
ae95ffebfa
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue