if (!sdi)
return SR_ERR_ARG;
devc = sdi->priv;
- if (devc->capture_flags & CAPTURE_FLAG_RLE)
- return SR_ERR_NA;
if (devc->max_samples == 0)
/* Device didn't specify sample memory size in metadata. */
return SR_ERR_NA;
/* If the device stops sending for longer than it takes to send a byte,
* that means it's finished. But wait at least 100 ms to be safe.
*/
- serial_source_add(sdi->session, serial, G_IO_IN, 100, ols_receive_data,
- (struct sr_dev_inst *)sdi);
-
- return SR_OK;
+ return serial_source_add(sdi->session, serial, G_IO_IN, 100,
+ ols_receive_data, (struct sr_dev_inst *)sdi);
}
static int dev_acquisition_stop(struct sr_dev_inst *sdi)