X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmotech-lps-30x%2Fapi.c;h=31bbfa43827f6c75fecb628bb461f093592fd51e;hb=b29f7be9c0b7d90469dee26daf0f3179cd67c065;hp=46407cc5f01cd95b498bad0eb744fd9d4a385cd9;hpb=07182332f06e09619b2ae2d61de16fafacd750cd;p=libsigrok.git diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index 46407cc5..31bbfa43 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -363,13 +363,12 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o sdi = NULL; devc = NULL; - conn = serialcomm = NULL; /* Process and check options. */ + conn = NULL; + serialcomm = SERIALCOMM; if (sr_serial_extract_options(options, &conn, &serialcomm) != SR_OK) return NULL; - if (!serialcomm) - serialcomm = SERIALCOMM; /* Init serial port. */ serial = sr_serial_dev_inst_new(conn, serialcomm); @@ -378,7 +377,6 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o goto exit_err; /* Query and verify model string. */ - serial_flush(serial); if (lps_cmd_reply(buf, serial, "MODEL") != SR_OK) return NULL;