]> sigrok.org Git - libsigrok.git/blobdiff - hardware/lascar-el-usb/api.c
build: Portability fixes.
[libsigrok.git] / hardware / lascar-el-usb / api.c
index 6014a8f6916b45c428ba18c2c56e3d800d89b974..04f844b3318b1d575a4eec0a8f23708e59a162a9 100644 (file)
@@ -159,14 +159,14 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *channel_group)
+               const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
        struct sr_usb_dev_inst *usb;
        int ret;
        char str[128];
 
-       (void)channel_group;
+       (void)cg;
 
        devc = sdi->priv;
        switch (id) {
@@ -195,12 +195,12 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *channel_group)
+               const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
        int ret;
 
-       (void)channel_group;
+       (void)cg;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -235,10 +235,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *channel_group)
+               const struct sr_channel_group *cg)
 {
        (void)sdi;
-       (void)channel_group;
+       (void)cg;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
@@ -434,7 +434,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        devc->log_size = xfer_in->buffer[1] + (xfer_in->buffer[2] << 8);
        libusb_free_transfer(xfer_out);
 
-       usb_source_add(drvc->sr_ctx, 100, lascar_el_usb_handle_events, (void *)sdi);
+       usb_source_add(sdi->session, drvc->sr_ctx, 100,
+                       lascar_el_usb_handle_events, (void *)sdi);
 
        buf = g_try_malloc(4096);
        libusb_fill_bulk_transfer(xfer_in, usb->devhdl, LASCAR_EP_IN,