]> sigrok.org Git - libsigrok.git/blobdiff - hardware/hantek-dso/api.c
build: Portability fixes.
[libsigrok.git] / hardware / hantek-dso / api.c
index c4c1464ac98f1a7024c9d5bb81ef8927f08678a6..c948e4216a8260ea591f207a5ebaf9d62feeb375 100644 (file)
@@ -176,7 +176,7 @@ static struct sr_dev_inst *dso_dev_new(int index, const struct dso_profile *prof
         * a trigger source internal to the device.
         */
        for (i = 0; channel_names[i]; i++) {
-               if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE,
+               if (!(ch = sr_channel_new(i, SR_CHANNEL_ANALOG, TRUE,
                                channel_names[i])))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
@@ -822,7 +822,7 @@ static int handle_event(int fd, int revents, void *cb_data)
                 * TODO: Doesn't really cancel pending transfers so they might
                 * come in after SR_DF_END is sent.
                 */
-               usb_source_remove(drvc->sr_ctx);
+               usb_source_remove(sdi->session, drvc->sr_ctx);
 
                packet.type = SR_DF_END;
                sr_session_send(sdi, &packet);
@@ -933,7 +933,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
                return SR_ERR;
 
        devc->dev_state = CAPTURE;
-       usb_source_add(drvc->sr_ctx, TICK, handle_event, (void *)sdi);
+       usb_source_add(sdi->session, drvc->sr_ctx, TICK, handle_event, (void *)sdi);
 
        /* Send header packet to the session bus. */
        std_session_send_df_header(cb_data, LOG_PREFIX);