X-Git-Url: http://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fhung-chang-dso-2100%2Fapi.c;h=842bdc212bfecce7872b81f3e7fc4bd7947542c6;hp=039ba3856d8d6a6af1b5726f90a4a99801b7df33;hb=15a5bfe4815f9991a9bb532c05d6244a1818a0e4;hpb=566007e15e8ec0a23b064ba8ea44baae305508b5 diff --git a/src/hardware/hung-chang-dso-2100/api.c b/src/hardware/hung-chang-dso-2100/api.c index 039ba385..842bdc21 100644 --- a/src/hardware/hung-chang-dso-2100/api.c +++ b/src/hardware/hung-chang-dso-2100/api.c @@ -102,14 +102,12 @@ static const uint8_t coupling_map[] = { 0x00, 0x08, 0x04 }; -static GSList *scan_port(GSList *devices, struct sr_dev_driver *di, - struct parport *port) +static GSList *scan_port(GSList *devices, struct parport *port) { struct sr_dev_inst *sdi; struct sr_channel *ch; struct sr_channel_group *cg; struct dev_context *devc; - struct drv_context *drvc; int i; if (ieee1284_open(port, 0, &i) != E1284_OK) { @@ -135,8 +133,6 @@ static GSList *scan_port(GSList *devices, struct sr_dev_driver *di, sdi->status = SR_ST_INACTIVE; sdi->vendor = g_strdup("Hung-Chang"); sdi->model = g_strdup("DSO-2100"); - sdi->driver = di; - drvc = di->context; sdi->inst_type = 0; /* FIXME */ sdi->conn = port; ieee1284_ref(port); @@ -169,7 +165,6 @@ static GSList *scan_port(GSList *devices, struct sr_dev_driver *di, devc->last_step = 0; /* buffersize = 1000 */ sdi->priv = devc; - drvc->instances = g_slist_append(drvc->instances, sdi); devices = g_slist_append(devices, sdi); fail3: @@ -209,7 +204,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) for (i = 0; i < ports.portc; i++) if (!strcmp(ports.portv[i]->name, conn)) { port_found = TRUE; - devices = scan_port(devices, di, ports.portv[i]); + devices = scan_port(devices, ports.portv[i]); } if (!port_found) { @@ -220,7 +215,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) ieee1284_free_ports(&ports); - return devices; + return std_scan_complete(di, devices); } static void clear_private(void *priv)