scan(): Consistently start out with SR_ST_INACTIVE.
A later call to open() will set the status to SR_ST_ACTIVE. Only in the case of firmware/bitstream upload start with SR_ST_INITIALIZING first.
This commit is contained in:
parent
e91d4ce2b2
commit
45884333ff
|
@ -129,7 +129,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
}
|
||||
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_ACTIVE;
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup("Arachnid Labs");
|
||||
sdi->model = g_strdup("Re:load Pro");
|
||||
sdi->version = g_strdup(buf + 8);
|
||||
|
|
|
@ -112,7 +112,7 @@ static int add_device(int model, struct libusb_device_descriptor *des,
|
|||
|
||||
/* 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 = g_strdup("ChronoVu");
|
||||
sdi->model = g_strdup(devc->prof->modelname);
|
||||
sdi->serial_num = g_strdup(serial_num);
|
||||
|
|
|
@ -88,7 +88,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
sr_spew("Conrad DIGI 35 CPU assumed at %s.", conn);
|
||||
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_ACTIVE;
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup("Conrad");
|
||||
sdi->model = g_strdup("DIGI 35 CPU");
|
||||
sdi->conn = serial;
|
||||
|
|
|
@ -284,7 +284,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
devices = NULL;
|
||||
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_ACTIVE;
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->model = g_strdup("Demo device");
|
||||
sdi->driver = di;
|
||||
|
||||
|
|
|
@ -148,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;
|
||||
|
|
|
@ -114,7 +114,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
|
||||
/* 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 = g_strdup(USB_VENDOR_NAME);
|
||||
sdi->model = g_strdup(USB_MODEL_NAME);
|
||||
sdi->driver = di;
|
||||
|
|
|
@ -135,7 +135,7 @@ static struct sr_dev_inst *probe_device(struct sr_modbus_dev_inst *modbus)
|
|||
}
|
||||
|
||||
sdi = g_malloc0(sizeof(struct sr_dev_inst));
|
||||
sdi->status = SR_ST_ACTIVE;
|
||||
sdi->status = SR_ST_INACTIVE;
|
||||
sdi->vendor = g_strdup("Maynuo");
|
||||
sdi->model = g_strdup(model->name);
|
||||
sdi->version = g_strdup_printf("v%d.%d", version/10, version%10);
|
||||
|
|
Loading…
Reference in New Issue