From: Uwe Hermann Date: Fri, 15 Apr 2011 18:47:26 +0000 (+0200) Subject: Don't close/reset the FTDI device too often. X-Git-Tag: libsigrok-0.1.0~287 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=15f2d0c0f2e39bc4338b0781b581aced0fca8e0c;p=libsigrok.git Don't close/reset the FTDI device too often. Only call la8_close_usb_reset_sequencer() in hw_closedev(), it's not needed in hw_stop_acquisition(). Thanks Ken Mobley of ChronoVu for the report. --- diff --git a/hardware/chronovu-la8/chronovu-la8.c b/hardware/chronovu-la8/chronovu-la8.c index 98a73284..13f07b06 100644 --- a/hardware/chronovu-la8/chronovu-la8.c +++ b/hardware/chronovu-la8/chronovu-la8.c @@ -605,7 +605,6 @@ static void hw_closedev(int device_index) if (sdi->status == SR_ST_ACTIVE) { sr_dbg("la8: %s: status ACTIVE, closing device", __func__); - /* TODO: Handle or ignore errors here? */ (void) la8_close_usb_reset_sequencer(la8); /* Ignore errors. */ } else { sr_dbg("la8: %s: status not ACTIVE, nothing to do", __func__); @@ -967,9 +966,6 @@ static void hw_stop_acquisition(int device_index, gpointer session_device_id) return; } - /* Reset the LA8 sequencer and close the device. */ - (void) la8_close_usb_reset_sequencer(la8); /* Ignore errors. */ - /* Send end packet to the session bus. */ sr_dbg("la8: %s: sending SR_DF_END", __func__); packet.type = SR_DF_END;