On Sun, May 03, 2020 at 10:57:50PM +0200, Wolfram Sang wrote: > Quite some drivers flush the serial port after opening it. And quite > some don't although they should. Factor this out, so serial_open() will > always flush the port. The removal in the drivers was done with this > small coccinelle script: > > @@ > struct sr_serial_dev_inst *serial; > @@ > > serial_open(serial, ...) > ... when != serial > - serial_flush(serial); > > and then the results and the unmatched findings of serial_flush() were > audited. > > Signed-off-by: Wolfram Sang <w...@the-dreams.de>
Unlike the libsp part, this was favored on IRC :) 23:16 < martling> I'm totally in favour of adding that in the libsigrok serial layer, though. 23:17 < gsi_> fine with me, leaves libsp as is which is often used in other projects or standalone, improves robustness in libsr for all serial transports, transparently benefits all libsr drivers, LGTM
signature.asc
Description: PGP signature
_______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel