}
/** @private */
-SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
+SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int mode, int index, int status,
const char *vendor, const char *model, const char *version)
{
struct sr_dev_inst *sdi;
}
sdi->driver = NULL;
+ sdi->mode = mode;
sdi->index = index;
sdi->status = status;
sdi->inst_type = -1;
}
/** @private */
+SR_PRIV void sr_dev_probes_free(struct sr_dev_inst *sdi)
+{
+ struct sr_probe *probe;
+ GSList *l;
+
+ for (l = sdi->probes; l; l = l->next) {
+ probe = l->data;
+ g_free(probe->name);
+ g_free(probe);
+ }
+
+ sdi->probes = NULL;
+}
+
SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi)
{
struct sr_probe *probe;