diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c index 99176ff9..0c743b32 100644 --- a/hardware/agilent-dmm/api.c +++ b/hardware/agilent-dmm/api.c @@ -61,11 +61,6 @@ 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 dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int init(struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -171,7 +166,7 @@ static GSList *dev_list(void) static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi, @@ -273,7 +268,7 @@ SR_PRIV struct sr_dev_driver agdmm_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = NULL, .config_set = config_set, .config_list = config_list, diff --git a/hardware/appa-55ii/api.c b/hardware/appa-55ii/api.c index 8e7ec36a..73c71af3 100644 --- a/hardware/appa-55ii/api.c +++ b/hardware/appa-55ii/api.c @@ -132,14 +132,9 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi, @@ -283,7 +278,7 @@ SR_PRIV struct sr_dev_driver appa_55ii_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/atten-pps3xxx/api.c b/hardware/atten-pps3xxx/api.c index 514ec756..c7e97601 100644 --- a/hardware/atten-pps3xxx/api.c +++ b/hardware/atten-pps3xxx/api.c @@ -200,14 +200,9 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi, @@ -510,7 +505,7 @@ SR_PRIV struct sr_dev_driver atten_pps3203_driver_info = { .cleanup = cleanup, .scan = scan_3203, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/brymen-dmm/api.c b/hardware/brymen-dmm/api.c index 4b43e3d7..cd11cc5e 100644 --- a/hardware/brymen-dmm/api.c +++ b/hardware/brymen-dmm/api.c @@ -39,11 +39,6 @@ static int init(struct sr_context *sr_ctx) return std_init(sr_ctx, di, LOG_PREFIX); } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static GSList *brymen_scan(const char *conn, const char *serialcomm) { struct sr_dev_inst *sdi; @@ -151,7 +146,7 @@ static GSList *dev_list(void) static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi, @@ -255,7 +250,7 @@ SR_PRIV struct sr_dev_driver brymen_bm857_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = NULL, .config_set = config_set, .config_list = config_list, diff --git a/hardware/cem-dt-885x/api.c b/hardware/cem-dt-885x/api.c index e1e4b2e4..1e036355 100644 --- a/hardware/cem-dt-885x/api.c +++ b/hardware/cem-dt-885x/api.c @@ -147,11 +147,6 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int dev_open(struct sr_dev_inst *sdi) { struct sr_serial_dev_inst *serial; @@ -167,7 +162,7 @@ static int dev_open(struct sr_dev_inst *sdi) static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi, @@ -427,7 +422,7 @@ SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/colead-slm/api.c b/hardware/colead-slm/api.c index 99455917..b24198cc 100644 --- a/hardware/colead-slm/api.c +++ b/hardware/colead-slm/api.c @@ -45,11 +45,6 @@ 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 dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int init(struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -131,7 +126,7 @@ static int dev_open(struct sr_dev_inst *sdi) static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi, @@ -234,7 +229,7 @@ SR_PRIV struct sr_dev_driver colead_slm_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = NULL, .config_set = config_set, .config_list = config_list, diff --git a/hardware/conrad-digi-35-cpu/api.c b/hardware/conrad-digi-35-cpu/api.c index 0887de29..bab100dc 100644 --- a/hardware/conrad-digi-35-cpu/api.c +++ b/hardware/conrad-digi-35-cpu/api.c @@ -116,14 +116,9 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi, @@ -222,7 +217,7 @@ SR_PRIV struct sr_dev_driver conrad_digi_35_cpu_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = NULL, .config_set = config_set, .config_list = config_list, diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index 433f3522..a3e85c34 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -166,11 +166,6 @@ static struct sr_dev_driver *di = &demo_driver_info; static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data); -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int init(struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -384,7 +379,7 @@ static int dev_close(struct sr_dev_inst *sdi) static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi, @@ -775,7 +770,7 @@ SR_PRIV struct sr_dev_driver demo_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/fluke-dmm/api.c b/hardware/fluke-dmm/api.c index 0cb0c115..08cd62f2 100644 --- a/hardware/fluke-dmm/api.c +++ b/hardware/fluke-dmm/api.c @@ -58,11 +58,6 @@ static const struct flukedmm_profile supported_flukedmm[] = { { FLUKE_190, "199B", 1000, 3500 }, }; -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int init(struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -204,7 +199,7 @@ static GSList *dev_list(void) static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi, @@ -313,7 +308,7 @@ SR_PRIV struct sr_dev_driver flukedmm_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = NULL, .config_set = config_set, .config_list = config_list, diff --git a/hardware/fx2lafw/api.c b/hardware/fx2lafw/api.c index 29c1887e..4ba888c4 100644 --- a/hardware/fx2lafw/api.c +++ b/hardware/fx2lafw/api.c @@ -115,11 +115,6 @@ static const uint64_t samplerates[] = { SR_PRIV struct sr_dev_driver fx2lafw_driver_info; static struct sr_dev_driver *di = &fx2lafw_driver_info; -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int init(struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -342,7 +337,8 @@ static int cleanup(void) if (!(drvc = di->priv)) return SR_OK; - ret = dev_clear(); + + ret = std_dev_clear(di, NULL); g_free(drvc); di->priv = NULL; @@ -556,7 +552,7 @@ SR_PRIV struct sr_dev_driver fx2lafw_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/gmc-mh-1x-2x/api.c b/hardware/gmc-mh-1x-2x/api.c index 6b16c2ec..f2f6018d 100644 --- a/hardware/gmc-mh-1x-2x/api.c +++ b/hardware/gmc-mh-1x-2x/api.c @@ -393,16 +393,6 @@ static GSList *dev_list_2x_bd232(void) ->instances; } -static int dev_clear_1x_2x_rs232(void) -{ - return std_dev_clear(&gmc_mh_1x_2x_rs232_driver_info, NULL); -} - -static int dev_clear_2x_bd232(void) -{ - return std_dev_clear(&gmc_mh_2x_bd232_driver_info, NULL); -} - static int dev_close(struct sr_dev_inst *sdi) { struct dev_context *devc; @@ -423,12 +413,12 @@ static int dev_close(struct sr_dev_inst *sdi) static int cleanup_sm_rs232(void) { - return dev_clear_1x_2x_rs232(); + return std_dev_clear(&gmc_mh_1x_2x_rs232_driver_info, NULL); } static int cleanup_2x_bd232(void) { - return dev_clear_2x_bd232(); + return std_dev_clear(&gmc_mh_2x_bd232_driver_info, NULL); } /** Get value of configuration item */ @@ -608,7 +598,7 @@ SR_PRIV struct sr_dev_driver gmc_mh_1x_2x_rs232_driver_info = { .cleanup = cleanup_sm_rs232, .scan = scan_1x_2x_rs232, .dev_list = dev_list_1x_2x_rs232, - .dev_clear = dev_clear_1x_2x_rs232, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list_sm, @@ -627,7 +617,7 @@ SR_PRIV struct sr_dev_driver gmc_mh_2x_bd232_driver_info = { .cleanup = cleanup_2x_bd232, .scan = scan_2x_bd232, .dev_list = dev_list_2x_bd232, - .dev_clear = dev_clear_2x_bd232, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list_bd, diff --git a/hardware/kecheng-kc-330b/api.c b/hardware/kecheng-kc-330b/api.c index d9e647d1..75f32345 100644 --- a/hardware/kecheng-kc-330b/api.c +++ b/hardware/kecheng-kc-330b/api.c @@ -171,11 +171,6 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int dev_open(struct sr_dev_inst *sdi) { struct drv_context *drvc; @@ -245,7 +240,8 @@ static int cleanup(void) /* Can get called on an unused driver, doesn't matter. */ return SR_OK; - ret = dev_clear(); + + ret = std_dev_clear(di, NULL); g_free(drvc); di->priv = NULL; @@ -567,7 +563,7 @@ SR_PRIV struct sr_dev_driver kecheng_kc_330b_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/lascar-el-usb/api.c b/hardware/lascar-el-usb/api.c index bf5654cb..96695c27 100644 --- a/hardware/lascar-el-usb/api.c +++ b/hardware/lascar-el-usb/api.c @@ -37,11 +37,6 @@ static const int32_t hwcaps[] = { SR_CONF_LIMIT_SAMPLES, }; -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int init(struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -155,7 +150,8 @@ static int cleanup(void) /* Can get called on an unused driver, doesn't matter. */ return SR_OK; - ret = dev_clear(); + + ret = std_dev_clear(di, NULL); g_free(drvc); di->priv = NULL; @@ -481,7 +477,7 @@ SR_PRIV struct sr_dev_driver lascar_el_usb_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/norma-dmm/api.c b/hardware/norma-dmm/api.c index 27a4db5e..9736eb27 100644 --- a/hardware/norma-dmm/api.c +++ b/hardware/norma-dmm/api.c @@ -163,11 +163,6 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int dev_close(struct sr_dev_inst *sdi) { struct dev_context *devc; @@ -186,7 +181,7 @@ static int dev_close(struct sr_dev_inst *sdi) static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi, @@ -301,7 +296,7 @@ SR_PRIV struct sr_dev_driver norma_dmm_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = NULL, .config_set = config_set, .config_list = config_list, diff --git a/hardware/openbench-logic-sniffer/api.c b/hardware/openbench-logic-sniffer/api.c index 38532994..af38e4ff 100644 --- a/hardware/openbench-logic-sniffer/api.c +++ b/hardware/openbench-logic-sniffer/api.c @@ -79,11 +79,6 @@ static const uint64_t samplerates[] = { SR_PRIV struct sr_dev_driver ols_driver_info; static struct sr_dev_driver *di = &ols_driver_info; -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int init(struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -214,7 +209,7 @@ static GSList *dev_list(void) static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi, @@ -586,7 +581,7 @@ SR_PRIV struct sr_dev_driver ols_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/saleae-logic16/api.c b/hardware/saleae-logic16/api.c index d2815f63..96de1bdf 100644 --- a/hardware/saleae-logic16/api.c +++ b/hardware/saleae-logic16/api.c @@ -240,11 +240,6 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int logic16_dev_open(struct sr_dev_inst *sdi) { libusb_device **devlist; @@ -424,7 +419,8 @@ static int cleanup(void) /* Can get called on an unused driver, doesn't matter. */ return SR_OK; - ret = dev_clear(); + + ret = std_dev_clear(di, NULL); g_free(drvc); di->priv = NULL; @@ -808,7 +804,7 @@ SR_PRIV struct sr_dev_driver saleae_logic16_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/teleinfo/api.c b/hardware/teleinfo/api.c index ffbabf06..c29b561e 100644 --- a/hardware/teleinfo/api.c +++ b/hardware/teleinfo/api.c @@ -172,14 +172,9 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi, @@ -281,7 +276,7 @@ SR_PRIV struct sr_dev_driver teleinfo_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = NULL, .config_set = config_set, .config_list = config_list, diff --git a/hardware/tondaj-sl-814/api.c b/hardware/tondaj-sl-814/api.c index 2ed95402..2d89e89b 100644 --- a/hardware/tondaj-sl-814/api.c +++ b/hardware/tondaj-sl-814/api.c @@ -40,11 +40,6 @@ 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 dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int init(struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -130,7 +125,7 @@ static GSList *dev_list(void) static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi, @@ -217,7 +212,7 @@ SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = NULL, .config_set = config_set, .config_list = config_list, diff --git a/hardware/uni-t-ut32x/api.c b/hardware/uni-t-ut32x/api.c index 84f87198..4fd89f44 100644 --- a/hardware/uni-t-ut32x/api.c +++ b/hardware/uni-t-ut32x/api.c @@ -116,11 +116,6 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int dev_open(struct sr_dev_inst *sdi) { struct drv_context *drvc; @@ -196,7 +191,8 @@ static int cleanup(void) /* Can get called on an unused driver, doesn't matter. */ return SR_OK; - ret = dev_clear(); + + ret = std_dev_clear(di, NULL); g_free(drvc); di->priv = NULL; @@ -376,7 +372,7 @@ SR_PRIV struct sr_dev_driver uni_t_ut32x_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/victor-dmm/api.c b/hardware/victor-dmm/api.c index 03462768..e32bb699 100644 --- a/hardware/victor-dmm/api.c +++ b/hardware/victor-dmm/api.c @@ -46,11 +46,6 @@ static const int32_t hwcaps[] = { SR_CONF_CONTINUOUS, }; -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int init(struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -198,7 +193,8 @@ static int cleanup(void) /* Can get called on an unused driver, doesn't matter. */ return SR_OK; - ret = dev_clear(); + + ret = std_dev_clear(di, NULL); g_free(drvc); di->priv = NULL; @@ -439,7 +435,7 @@ SR_PRIV struct sr_dev_driver victor_dmm_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list, diff --git a/hardware/zeroplus-logic-cube/api.c b/hardware/zeroplus-logic-cube/api.c index 56804f22..f2e6724d 100644 --- a/hardware/zeroplus-logic-cube/api.c +++ b/hardware/zeroplus-logic-cube/api.c @@ -239,11 +239,6 @@ SR_PRIV int zp_set_samplerate(struct dev_context *devc, uint64_t samplerate) return SR_OK; } -static int dev_clear(void) -{ - return std_dev_clear(di, NULL); -} - static int init(struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -468,7 +463,7 @@ static int dev_close(struct sr_dev_inst *sdi) static int cleanup(void) { - return dev_clear(); + return std_dev_clear(di, NULL); } static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi, @@ -827,7 +822,7 @@ SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = dev_clear, + .dev_clear = NULL, .config_get = config_get, .config_set = config_set, .config_list = config_list,