X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsysclk-lwla%2Fapi.c;h=2b20db838e99cf5441f0bb40d415b63e94c9abce;hb=b02bb45f4cf6378520e5a5b82ff39013cfa270b6;hp=99c73282bc8dfd16c544c9608274a5fdbfc8bf55;hpb=c2fdcc25a47c4c8f25e3ea96ea36a674a151e839;p=libsigrok.git diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c index 99c73282..2b20db83 100644 --- a/src/hardware/sysclk-lwla/api.c +++ b/src/hardware/sysclk-lwla/api.c @@ -194,15 +194,13 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) continue; /* no match */ /* Register device instance with driver. */ - sdi->driver = di; - 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); } /* Destroy the private device context. @@ -774,7 +772,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) /* SysClk LWLA driver descriptor. */ -SR_PRIV struct sr_dev_driver sysclk_lwla_driver_info = { +static struct sr_dev_driver sysclk_lwla_driver_info = { .name = "sysclk-lwla", .longname = "SysClk LWLA series", .api_version = 1, @@ -794,3 +792,4 @@ SR_PRIV struct sr_dev_driver sysclk_lwla_driver_info = { .dev_acquisition_stop = dev_acquisition_stop, .context = NULL, }; +SR_REGISTER_DEV_DRIVER(sysclk_lwla_driver_info);