]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/uni-t-dmm/protocol.c
drivers: Add and use STD_CONFIG_LIST().
[libsigrok.git] / src / hardware / uni-t-dmm / protocol.c
index 5503584e33bcfef256665212dc2c51aae9461ecc..4114aec4d831954ccc5d4f705112088a740a764d 100644 (file)
@@ -102,7 +102,7 @@ static int hid_chip_init(struct sr_dev_inst *sdi, uint16_t baudrate)
        struct sr_usb_dev_inst *usb;
 
        usb = sdi->conn;
-       
+
        /* Detach kernel drivers which grabbed this device (if any). */
        if (libusb_kernel_driver_active(usb->devhdl, 0) == 1) {
                ret = libusb_detach_kernel_driver(usb->devhdl, 0);
@@ -111,9 +111,6 @@ static int hid_chip_init(struct sr_dev_inst *sdi, uint16_t baudrate)
                               libusb_error_name(ret));
                        return SR_ERR;
                }
-               sr_dbg("Successfully detached kernel driver.");
-       } else {
-               sr_dbg("No need to detach a kernel driver.");
        }
 
        /* Claim interface 0. */
@@ -122,7 +119,6 @@ static int hid_chip_init(struct sr_dev_inst *sdi, uint16_t baudrate)
                       libusb_error_name(ret));
                return SR_ERR;
        }
-       sr_dbg("Successfully claimed interface 0.");
 
        /* Set data for the HID feature report (e.g. baudrate). */
        buf[0] = baudrate & 0xff;        /* Baudrate, LSB */
@@ -158,8 +154,6 @@ static int hid_chip_init(struct sr_dev_inst *sdi, uint16_t baudrate)
                return SR_ERR;
        }
 
-       sr_dbg("Successfully sent initial HID feature report.");
-
        return SR_OK;
 }
 
@@ -290,7 +284,7 @@ SR_PRIV int uni_t_dmm_receive_data(int fd, int revents, void *cb_data)
 
        /* Abort acquisition if we acquired enough samples. */
        if (sr_sw_limits_check(&devc->limits))
-               sdi->driver->dev_acquisition_stop(sdi);
+               sr_dev_acquisition_stop(sdi);
 
        return TRUE;
 }