]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/ftdi-la/api.c
scan(): Consistently start out with SR_ST_INACTIVE.
[libsigrok.git] / src / hardware / ftdi-la / api.c
index a2cc4a75db3d8333b545d234bd84f69d52b8897f..c49c9c7d6ef8a2b5382699b77579eb923ba6a80e 100644 (file)
@@ -32,7 +32,7 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
        SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_CONN | SR_CONF_GET,
@@ -84,11 +84,6 @@ static const struct ftdi_chip_desc *chip_descs[] = {
        &ft232r_desc,
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(sr_ctx, di, LOG_PREFIX);
-}
-
 static void scan_device(struct sr_dev_driver *di, struct libusb_device *dev, GSList **devices)
 {
        struct libusb_device_descriptor usb_desc;
@@ -153,7 +148,7 @@ static void scan_device(struct sr_dev_driver *di, struct libusb_device *dev, GSL
 
        /* Register the device with libsigrok. */
        sdi = g_malloc0(sizeof(struct sr_dev_inst));
-       sdi->status = SR_ST_INITIALIZING;
+       sdi->status = SR_ST_INACTIVE;
        sdi->vendor = vendor;
        sdi->model = model;
        sdi->serial_num = serial_num;
@@ -491,7 +486,7 @@ SR_PRIV struct sr_dev_driver ftdi_la_driver_info = {
        .name = "ftdi-la",
        .longname = "FTDI LA",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,