X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fkecheng-kc-330b%2Fprotocol.c;fp=hardware%2Fkecheng-kc-330b%2Fprotocol.c;h=c6263cde3227d6c95069ff4de6c27dbf74360ba8;hb=6c60facc190a03c50aa66d4b1d17c825fec5d20e;hp=a3a09514a419663edb0b423d194d8fa76b797ccf;hpb=ba1949f583de322e74f43eb880529155a763a84f;p=libsigrok.git diff --git a/hardware/kecheng-kc-330b/protocol.c b/hardware/kecheng-kc-330b/protocol.c index a3a09514..c6263cde 100644 --- a/hardware/kecheng-kc-330b/protocol.c +++ b/hardware/kecheng-kc-330b/protocol.c @@ -34,7 +34,7 @@ SR_PRIV int kecheng_kc_330b_handle_events(int fd, int revents, void *cb_data) struct timeval tv; const uint64_t *intv_entry; gint64 now, interval; - int offset, len, ret, i; + int offset, len, ret; unsigned char buf[4]; (void)fd; @@ -51,8 +51,7 @@ SR_PRIV int kecheng_kc_330b_handle_events(int fd, int revents, void *cb_data) if (sdi->status == SR_ST_STOPPING) { libusb_free_transfer(devc->xfer); - for (i = 0; devc->usbfd[i] != -1; i++) - sr_source_remove(devc->usbfd[i]); + usb_source_remove(drvc->sr_ctx); packet.type = SR_DF_END; sr_session_send(cb_data, &packet); sdi->status = SR_ST_ACTIVE;