]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/testo/api.c
Use driver name as the log prefix in standard functions
[libsigrok.git] / src / hardware / testo / api.c
index 8e60f6b892fb72e03d4974e31a7a5819767ebe88..2f44eaad16cad319102a7530ccc671b2e2ee9996 100644 (file)
@@ -58,7 +58,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
        devices = NULL;
        drvc = di->context;
-       drvc->instances = NULL;
 
        conn_devices = NULL;
        for (l = options; l; l = l->next) {
@@ -129,13 +128,12 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                sdi->priv = devc;
                if (testo_probe_channels(sdi) != SR_OK)
                        continue;
-               drvc->instances = g_slist_append(drvc->instances, sdi);
                devices = g_slist_append(devices, sdi);
        }
        libusb_free_device_list(devlist, 1);
        g_slist_free_full(conn_devices, (GDestroyNotify)sr_usb_dev_inst_free);
 
-       return devices;
+       return std_scan_complete(di, devices);
 }
 
 static int dev_open(struct sr_dev_inst *sdi)
@@ -354,7 +352,7 @@ static int handle_events(int fd, int revents, void *cb_data)
        if (sdi->status == SR_ST_STOPPING) {
                usb_source_remove(sdi->session, drvc->sr_ctx);
                dev_close(sdi);
-               std_session_send_df_end(sdi, LOG_PREFIX);
+               std_session_send_df_end(sdi);
        }
 
        memset(&tv, 0, sizeof(struct timeval));
@@ -383,7 +381,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        usb = sdi->conn;
        devc->reply_size = 0;
 
-       std_session_send_df_header(sdi, LOG_PREFIX);
+       std_session_send_df_header(sdi);
 
        usb_source_add(sdi->session, drvc->sr_ctx, 100,
                        handle_events, (void *)sdi);