]> sigrok.org Git - libsigrok.git/blobdiff - hardware/uni-t-ut32x/api.c
Add struct sr_session parameter to all session source backends.
[libsigrok.git] / hardware / uni-t-ut32x / api.c
index cc09a4bcc002eb0695f5a1ae5d20776b8f84bccc..81024dc7cc0548afb6d2515d636bc96519c9f4db 100644 (file)
@@ -86,7 +86,7 @@ static GSList *scan(GSList *options)
                        sdi->inst_type = SR_INST_USB;
                        sdi->conn = l->data;
                        for (i = 0; i < 3; i++) {
-                               if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE,
+                               if (!(ch = sr_channel_new(i, SR_CHANNEL_ANALOG, TRUE,
                                                channels[i]))) {
                                        sr_dbg("Channel malloc failed.");
                                        return NULL;
@@ -345,7 +345,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
                return SR_ERR;
        }
 
-       usb_source_add(drvc->sr_ctx, 10, uni_t_ut32x_handle_events, (void *)sdi);
+       usb_source_add(sdi->session, drvc->sr_ctx, 10,
+                       uni_t_ut32x_handle_events, (void *)sdi);
 
        return SR_OK;
 }