X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Flascar-el-usb%2Fprotocol.c;h=032db07e69c620c827b9f5d2cdba7ad2f1b4f520;hb=6c60facc190a03c50aa66d4b1d17c825fec5d20e;hp=3f9cbc88b65bdf3d5cdfdae31b144ae9fca18657;hpb=ba1949f583de322e74f43eb880529155a763a84f;p=libsigrok.git diff --git a/hardware/lascar-el-usb/protocol.c b/hardware/lascar-el-usb/protocol.c index 3f9cbc88..032db07e 100644 --- a/hardware/lascar-el-usb/protocol.c +++ b/hardware/lascar-el-usb/protocol.c @@ -488,22 +488,18 @@ static void lascar_el_usb_dispatch(struct sr_dev_inst *sdi, unsigned char *buf, SR_PRIV int lascar_el_usb_handle_events(int fd, int revents, void *cb_data) { - struct dev_context *devc; struct drv_context *drvc = di->priv; struct sr_datafeed_packet packet; struct sr_dev_inst *sdi; struct timeval tv; - int i; (void)fd; (void)revents; sdi = cb_data; - devc = sdi->priv; if (sdi->status == SR_ST_STOPPING) { - 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);