SR_PRIV struct sr_dev_driver agdmm_driver_info;
static struct sr_dev_driver *di = &agdmm_driver_info;
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
g_free((void *)devc->samplerates);
}
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, clear_helper);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
ftdi_deinit(&devc->ftdic);
}
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, clear_helper);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
return std_init(sr_ctx, di, LOG_PREFIX);
}
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
g_free(devc->final_buf);
}
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, clear_helper);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
SR_PRIV struct sr_dev_driver colead_slm_driver_info;
static struct sr_dev_driver *di = &colead_slm_driver_info;
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data);
-static int clear_instances(void)
+static int dev_clear(void)
{
/* Nothing needed so far. */
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
{ FLUKE_190, "199B", 1000, 3500 },
};
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
return devc;
}
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
static int cleanup(void)
{
- struct drv_context *drvc;
int ret;
+ struct drv_context *drvc;
if (!(drvc = di->priv))
return SR_OK;
- ret = clear_instances();
+ ret = dev_clear();
g_free(drvc);
di->priv = NULL;
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
}
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, clear_dev_context);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
SR_CONF_LIMIT_SAMPLES,
};
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
/* Can get called on an unused driver, doesn't matter. */
return SR_OK;
- ret = clear_instances();
+ ret = dev_clear();
g_free(drvc);
di->priv = NULL;
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
},
};
-static int clear_instances(int idx)
+static int dev_clear(int idx)
{
return std_dev_clear(mic_devs[idx].di, NULL);
}
static int cleanup(int idx)
{
- return clear_instances(idx);
+ return dev_clear(idx);
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
static GSList *scan_##X(GSList *options) { return scan(options, X); }
#define HW_DEV_LIST(X) \
static GSList *dev_list_##X(void) { return dev_list(X); }
-#define CLEAR_INSTANCES(X) \
-static int clear_instances_##X(void) { return clear_instances(X); }
+#define HW_DEV_CLEAR(X) \
+static int dev_clear_##X(void) { return dev_clear(X); }
#define HW_DEV_ACQUISITION_START(X) \
static int dev_acquisition_start_##X(const struct sr_dev_inst *sdi, \
void *cb_data) { return dev_acquisition_start(sdi, cb_data, X); }
HW_CLEANUP(ID_UPPER) \
HW_SCAN(ID_UPPER) \
HW_DEV_LIST(ID_UPPER) \
-CLEAR_INSTANCES(ID_UPPER) \
+HW_DEV_CLEAR(ID_UPPER) \
HW_DEV_ACQUISITION_START(ID_UPPER) \
SR_PRIV struct sr_dev_driver ID##_driver_info = { \
.name = NAME, \
.cleanup = cleanup_##ID_UPPER, \
.scan = scan_##ID_UPPER, \
.dev_list = dev_list_##ID_UPPER, \
- .dev_clear = clear_instances_##ID_UPPER, \
+ .dev_clear = dev_clear_##ID_UPPER, \
.config_get = NULL, \
.config_set = config_set, \
.config_list = config_list, \
SR_PRIV struct sr_dev_driver nexus_osciprime_driver_info;
static struct sr_dev_driver *di = &nexus_osciprime_driver_info;
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
g_free(devc->trigger_slope);
}
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, clear_helper);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
},
};
-static int clear_instances(int dmm)
+static int dev_clear(int dmm)
{
return std_dev_clear(dmms[dmm].di, NULL);
}
static int cleanup(int dmm)
{
- return clear_instances(dmm);
+ return dev_clear(dmm);
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
static GSList *scan_##X(GSList *options) { return scan(options, X); }
#define HW_DEV_LIST(X) \
static GSList *dev_list_##X(void) { return dev_list(X); }
-#define CLEAR_INSTANCES(X) \
-static int clear_instances_##X(void) { return clear_instances(X); }
+#define HW_DEV_CLEAR(X) \
+static int dev_clear_##X(void) { return dev_clear(X); }
#define HW_DEV_ACQUISITION_START(X) \
static int dev_acquisition_start_##X(const struct sr_dev_inst *sdi, \
void *cb_data) { return dev_acquisition_start(sdi, cb_data, X); }
HW_CLEANUP(ID_UPPER) \
HW_SCAN(ID_UPPER) \
HW_DEV_LIST(ID_UPPER) \
-CLEAR_INSTANCES(ID_UPPER) \
+HW_DEV_CLEAR(ID_UPPER) \
HW_DEV_ACQUISITION_START(ID_UPPER) \
SR_PRIV struct sr_dev_driver ID##_driver_info = { \
.name = NAME, \
.cleanup = cleanup_##ID_UPPER, \
.scan = scan_##ID_UPPER, \
.dev_list = dev_list_##ID_UPPER, \
- .dev_clear = clear_instances_##ID_UPPER, \
+ .dev_clear = dev_clear_##ID_UPPER, \
.config_get = NULL, \
.config_set = config_set, \
.config_list = config_list, \
SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info;
static struct sr_dev_driver *di = &tondaj_sl_814_driver_info;
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
},
};
-static int clear_instances(int dmm)
+static int dev_clear(int dmm)
{
return std_dev_clear(udmms[dmm].di, NULL);
}
static int cleanup(int dmm)
{
- return clear_instances(dmm);
+ return dev_clear(dmm);
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
static GSList *scan_##X(GSList *options) { return scan(options, X); }
#define HW_DEV_LIST(X) \
static GSList *dev_list_##X(void) { return dev_list(X); }
-#define CLEAR_INSTANCES(X) \
-static int clear_instances_##X(void) { return clear_instances(X); }
+#define HW_DEV_CLEAR(X) \
+static int dev_clear_##X(void) { return dev_clear(X); }
#define HW_DEV_ACQUISITION_START(X) \
static int dev_acquisition_start_##X(const struct sr_dev_inst *sdi, \
void *cb_data) { return dev_acquisition_start(sdi, cb_data, X); }
HW_CLEANUP(ID_UPPER) \
HW_SCAN(ID_UPPER) \
HW_DEV_LIST(ID_UPPER) \
-CLEAR_INSTANCES(ID_UPPER) \
+HW_DEV_CLEAR(ID_UPPER) \
HW_DEV_ACQUISITION_START(ID_UPPER) \
HW_DEV_OPEN(ID_UPPER) \
SR_PRIV struct sr_dev_driver ID##_driver_info = { \
.cleanup = cleanup_##ID_UPPER, \
.scan = scan_##ID_UPPER, \
.dev_list = dev_list_##ID_UPPER, \
- .dev_clear = clear_instances_##ID_UPPER, \
+ .dev_clear = dev_clear_##ID_UPPER, \
.config_get = NULL, \
.config_set = config_set, \
.config_list = config_list, \
SR_CONF_CONTINUOUS,
};
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
/* Can get called on an unused driver, doesn't matter. */
return SR_OK;
- ret = clear_instances();
+ ret = dev_clear();
g_free(drvc);
di->priv = NULL;
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = clear_instances,
+ .dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
return SR_OK;
}
-static int clear_instances(void)
+static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
static int cleanup(void)
{
- return clear_instances();
+ return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = cleanup,
+ .dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,