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:
Alexandru Gagniuc 2012-12-02 12:43:37 -06:00 committed by Uwe Hermann
parent d5ce233fe1
commit ae95ffebfa
1 changed files with 1 additions and 1 deletions

View File

@ -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;