]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/appa-55ii/api.c
Fix a few "variable set but not used" compiler warnings.
[libsigrok.git] / src / hardware / appa-55ii / api.c
index d6c5d6a93bdbfa656a59ae4df5175b9c5a7780cc..960b88167e6a6c8a66779dc7b054b19643c711f0 100644 (file)
@@ -44,7 +44,6 @@ static const char *data_sources[] = {
 
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
-       struct drv_context *drvc;
        struct dev_context *devc;
        struct sr_serial_dev_inst *serial;
        struct sr_dev_inst *sdi;
@@ -80,8 +79,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
        sr_info("Probing serial port %s.", conn);
 
-       drvc = di->context;
-       drvc->instances = NULL;
        serial_flush(serial);
 
        /* Let's get a bit of data and see if we can find a packet. */
@@ -100,18 +97,16 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        sdi->inst_type = SR_INST_SERIAL;
        sdi->conn = serial;
        sdi->priv = devc;
-       sdi->driver = di;
 
        sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "T1");
        sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "T2");
 
-       drvc->instances = g_slist_append(drvc->instances, sdi);
        devices = g_slist_append(devices, sdi);
 
 scan_cleanup:
        serial_close(serial);
 
-       return devices;
+       return std_scan_complete(di, devices);
 }
 
 static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,