]> sigrok.org Git - libsigrok.git/blobdiff - hardware/lascar-el-usb/protocol.c
Various cosmetics, whitespace, consistency fixes.
[libsigrok.git] / hardware / lascar-el-usb / protocol.c
index 1b75bef7aa906142fdc684e2a4f361c4e38b02cd..3f9cbc88b65bdf3d5cdfdae31b144ae9fca18657 100644 (file)
@@ -505,8 +505,6 @@ SR_PRIV int lascar_el_usb_handle_events(int fd, int revents, void *cb_data)
                for (i = 0; devc->usbfd[i] != -1; i++)
                        sr_source_remove(devc->usbfd[i]);
 
-               sdi->driver->dev_close(sdi);
-
                packet.type = SR_DF_END;
                sr_session_send(cb_data, &packet);
        }
@@ -532,7 +530,7 @@ SR_PRIV void lascar_el_usb_receive_transfer(struct libusb_transfer *transfer)
        switch (transfer->status) {
        case LIBUSB_TRANSFER_NO_DEVICE:
                /* USB device was unplugged. */
-               hw_dev_acquisition_stop(sdi, sdi);
+               dev_acquisition_stop(sdi, sdi);
                return;
        case LIBUSB_TRANSFER_COMPLETED:
        case LIBUSB_TRANSFER_TIMED_OUT: /* We may have received some data though */
@@ -551,7 +549,7 @@ SR_PRIV void lascar_el_usb_receive_transfer(struct libusb_transfer *transfer)
                                devc->rcvd_bytes, devc->log_size,
                                devc->rcvd_samples, devc->logged_samples);
                if (devc->rcvd_bytes >= devc->log_size)
-                       hw_dev_acquisition_stop(sdi, sdi);
+                       dev_acquisition_stop(sdi, sdi);
        }
 
        if (sdi->status == SR_ST_ACTIVE) {
@@ -561,7 +559,7 @@ SR_PRIV void lascar_el_usb_receive_transfer(struct libusb_transfer *transfer)
                               libusb_error_name(ret));
                        g_free(transfer->buffer);
                        libusb_free_transfer(transfer);
-                       hw_dev_acquisition_stop(sdi, sdi);
+                       dev_acquisition_stop(sdi, sdi);
                }
        } else {
                /* This was the last transfer we're going to receive, so
@@ -660,4 +658,3 @@ SR_PRIV int lascar_stop_logging(const struct sr_dev_inst *sdi)
 
        return ret;
 }
-