X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fikalogic-scanaplus%2Fapi.c;h=af33244dedb7b00adbfada8acad7509dd160ae97;hb=0f33aaef545e7289a02dc8115b282b24bb16fc27;hp=30b62e3ca82fce1109639fe6cfe0cb91049b90de;hpb=15a5bfe4815f9991a9bb532c05d6244a1818a0e4;p=libsigrok.git diff --git a/src/hardware/ikalogic-scanaplus/api.c b/src/hardware/ikalogic-scanaplus/api.c index 30b62e3c..af33244d 100644 --- a/src/hardware/ikalogic-scanaplus/api.c +++ b/src/hardware/ikalogic-scanaplus/api.c @@ -66,18 +66,12 @@ static int dev_clear(const struct sr_dev_driver *di) static GSList *scan(struct sr_dev_driver *di, GSList *options) { struct sr_dev_inst *sdi; - struct drv_context *drvc; struct dev_context *devc; - GSList *devices; unsigned int i; int ret; (void)options; - drvc = di->context; - - devices = NULL; - /* Allocate memory for our private device context. */ devc = g_malloc0(sizeof(struct dev_context)); @@ -120,12 +114,10 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) for (i = 0; i < ARRAY_SIZE(channel_names); i++) sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, channel_names[i]); - devices = g_slist_append(devices, sdi); - /* Close device. We'll reopen it again when we need it. */ scanaplus_close(devc); - return std_scan_complete(di, devices); + return std_scan_complete(di, g_slist_append(NULL, sdi)); scanaplus_close(devc); err_free_ftdic: @@ -357,7 +349,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) if ((ret = scanaplus_start_acquisition(devc)) < 0) return ret; - std_session_send_df_header(sdi, LOG_PREFIX); + std_session_send_df_header(sdi); /* Hook up a dummy handler to receive data from the device. */ sr_session_source_add(sdi->session, -1, 0, 0, scanaplus_receive_data, (void *)sdi); @@ -369,7 +361,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) { sr_dbg("Stopping acquisition."); sr_session_source_remove(sdi->session, -1); - std_session_send_df_end(sdi, LOG_PREFIX); + std_session_send_df_end(sdi); return SR_OK; }