gmc-mh-1x-2x: Remove SERIAL_NONBLOCK flag.
All calls in the driver are now explicitly (non)blocking.
This commit is contained in:
parent
612db3c44b
commit
e13e354f89
|
@ -198,7 +198,7 @@ static GSList *scan_1x_2x_rs232(GSList *options)
|
|||
if (!(serial = sr_serial_dev_inst_new(conn, serialcomm)))
|
||||
return NULL;
|
||||
|
||||
if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK) {
|
||||
if (serial_open(serial, SERIAL_RDWR) != SR_OK) {
|
||||
sr_serial_dev_inst_free(serial);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ static GSList *scan_2x_bd232(GSList *options)
|
|||
if (!(serial = sr_serial_dev_inst_new(conn, serialcomm)))
|
||||
return NULL;
|
||||
|
||||
if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
|
||||
if (serial_open(serial, SERIAL_RDWR) != SR_OK)
|
||||
goto exit_err;
|
||||
|
||||
if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
|
||||
|
|
|
@ -1307,7 +1307,7 @@ int req_meas14(const struct sr_dev_inst *sdi)
|
|||
devc->cmd_idx = 0;
|
||||
create_cmd_14(devc->addr, 8, params, msg);
|
||||
devc->req_sent_at = g_get_monotonic_time();
|
||||
if (serial_write_blocking(serial, msg, sizeof(msg)) < 0) {
|
||||
if (serial_write_blocking(serial, msg, sizeof(msg)) == -1) {
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
|
@ -1350,7 +1350,7 @@ int req_stat14(const struct sr_dev_inst *sdi, gboolean power_on)
|
|||
|
||||
/* Write message and wait for reply */
|
||||
devc->req_sent_at = g_get_monotonic_time();
|
||||
if (serial_write_blocking(serial, msg, sizeof(msg)) < 0) {
|
||||
if (serial_write_blocking(serial, msg, sizeof(msg)) == -1) {
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue