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:
Uwe Hermann 2016-04-23 21:27:59 +02:00
parent e91d4ce2b2
commit 45884333ff
7 changed files with 7 additions and 7 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);