s/clear_instances/dev_clear/.

Consistently use the same name for the dev_clear() API callback
everywhere.
This commit is contained in:
Uwe Hermann 2013-05-31 16:09:57 +02:00
parent f6beaac55c
commit 3b412e3a30
19 changed files with 66 additions and 66 deletions

View File

@ -61,7 +61,7 @@ static const struct agdmm_profile supported_agdmm[] = {
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);
}
@ -197,7 +197,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
@ -295,7 +295,7 @@ SR_PRIV struct sr_dev_driver agdmm_driver_info = {
.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,

View File

@ -46,7 +46,7 @@ static void clear_helper(void *priv)
g_free((void *)devc->samplerates);
}
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, clear_helper);
}
@ -123,7 +123,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
@ -325,7 +325,7 @@ SR_PRIV struct sr_dev_driver alsa_driver_info = {
.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,

View File

@ -389,7 +389,7 @@ static void clear_helper(void *priv)
ftdi_deinit(&devc->ftdic);
}
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, clear_helper);
}
@ -741,7 +741,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
@ -1398,7 +1398,7 @@ SR_PRIV struct sr_dev_driver asix_sigma_driver_info = {
.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,

View File

@ -39,7 +39,7 @@ static int init(struct sr_context *sr_ctx)
return std_init(sr_ctx, di, LOG_PREFIX);
}
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
@ -177,7 +177,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
@ -276,7 +276,7 @@ SR_PRIV struct sr_dev_driver brymen_bm857_driver_info = {
.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,

View File

@ -66,7 +66,7 @@ static void clear_helper(void *priv)
g_free(devc->final_buf);
}
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, clear_helper);
}
@ -259,7 +259,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
@ -499,7 +499,7 @@ SR_PRIV struct sr_dev_driver chronovu_la8_driver_info = {
.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,

View File

@ -45,7 +45,7 @@ static const int32_t hwcaps[] = {
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);
}
@ -144,7 +144,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
@ -243,7 +243,7 @@ SR_PRIV struct sr_dev_driver colead_slm_driver_info = {
.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,

View File

@ -143,7 +143,7 @@ static struct sr_dev_driver *di = &demo_driver_info;
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. */
@ -528,7 +528,7 @@ SR_PRIV struct sr_dev_driver demo_driver_info = {
.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,

View File

@ -58,7 +58,7 @@ static const struct flukedmm_profile supported_flukedmm[] = {
{ FLUKE_190, "199B", 1000, 3500 },
};
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
@ -230,7 +230,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
@ -335,7 +335,7 @@ SR_PRIV struct sr_dev_driver flukedmm_driver_info = {
.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,

View File

@ -346,7 +346,7 @@ static struct dev_context *fx2lafw_dev_new(void)
return devc;
}
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
@ -567,13 +567,13 @@ static int dev_close(struct sr_dev_inst *sdi)
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;
@ -1038,7 +1038,7 @@ SR_PRIV struct sr_dev_driver fx2lafw_driver_info = {
.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,

View File

@ -244,7 +244,7 @@ static void clear_dev_context(void *priv)
}
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, clear_dev_context);
}
@ -419,7 +419,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
@ -965,7 +965,7 @@ SR_PRIV struct sr_dev_driver hantek_dso_driver_info = {
.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,

View File

@ -38,7 +38,7 @@ static const int32_t hwcaps[] = {
SR_CONF_LIMIT_SAMPLES,
};
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
@ -156,7 +156,7 @@ static int cleanup(void)
/* 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;
@ -484,7 +484,7 @@ SR_PRIV struct sr_dev_driver lascar_el_usb_driver_info = {
.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,

View File

@ -49,7 +49,7 @@ SR_PRIV const struct mic_dev_info mic_devs[] = {
},
};
static int clear_instances(int idx)
static int dev_clear(int idx)
{
return std_dev_clear(mic_devs[idx].di, NULL);
}
@ -185,7 +185,7 @@ static int dev_close(struct sr_dev_inst *sdi)
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)
@ -275,8 +275,8 @@ static int cleanup_##X(void) { return cleanup(X); }
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); }
@ -287,7 +287,7 @@ HW_INIT(ID_UPPER) \
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, \
@ -297,7 +297,7 @@ 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, \

View File

@ -105,7 +105,7 @@ static const uint64_t vdivs[][2] = {
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);
}
@ -209,7 +209,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
@ -278,7 +278,7 @@ SR_PRIV struct sr_dev_driver nexus_osciprime_driver_info = {
.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,

View File

@ -152,7 +152,7 @@ static void clear_helper(void *priv)
g_free(devc->trigger_slope);
}
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, clear_helper);
}
@ -364,7 +364,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
@ -646,7 +646,7 @@ SR_PRIV struct sr_dev_driver rigol_ds1xx2_driver_info = {
.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,

View File

@ -192,7 +192,7 @@ SR_PRIV struct dmm_info dmms[] = {
},
};
static int clear_instances(int dmm)
static int dev_clear(int dmm)
{
return std_dev_clear(dmms[dmm].di, NULL);
}
@ -354,7 +354,7 @@ static int dev_close(struct sr_dev_inst *sdi)
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)
@ -458,8 +458,8 @@ static int cleanup_##X(void) { return cleanup(X); }
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); }
@ -470,7 +470,7 @@ HW_INIT(ID_UPPER) \
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, \
@ -480,7 +480,7 @@ 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, \

View File

@ -40,7 +40,7 @@ static const int32_t hwcaps[] = {
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);
}
@ -156,7 +156,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
@ -239,7 +239,7 @@ SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info = {
.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,

View File

@ -89,7 +89,7 @@ SR_PRIV struct dmm_info udmms[] = {
},
};
static int clear_instances(int dmm)
static int dev_clear(int dmm)
{
return std_dev_clear(udmms[dmm].di, NULL);
}
@ -196,7 +196,7 @@ static int dev_close(struct sr_dev_inst *sdi)
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)
@ -299,8 +299,8 @@ static int cleanup_##X(void) { return cleanup(X); }
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); }
@ -313,7 +313,7 @@ HW_INIT(ID_UPPER) \
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 = { \
@ -324,7 +324,7 @@ 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, \

View File

@ -46,7 +46,7 @@ static const int32_t hwcaps[] = {
SR_CONF_CONTINUOUS,
};
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
@ -198,7 +198,7 @@ static int cleanup(void)
/* 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;
@ -443,7 +443,7 @@ SR_PRIV struct sr_dev_driver victor_dmm_driver_info = {
.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,

View File

@ -238,7 +238,7 @@ SR_PRIV int zp_set_samplerate(struct dev_context *devc, uint64_t samplerate)
return SR_OK;
}
static int clear_instances(void)
static int dev_clear(void)
{
return std_dev_clear(di, NULL);
}
@ -464,7 +464,7 @@ static int dev_close(struct sr_dev_inst *sdi)
static int cleanup(void)
{
return clear_instances();
return dev_clear();
}
static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
@ -663,7 +663,7 @@ SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info = {
.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,