]> sigrok.org Git - libsigrok.git/commitdiff
Remove std_dev_clear() wrappers from drivers.
authorBert Vermeulen <redacted>
Wed, 26 Feb 2014 20:37:18 +0000 (21:37 +0100)
committerBert Vermeulen <redacted>
Wed, 26 Feb 2014 20:37:18 +0000 (21:37 +0100)
21 files changed:
hardware/agilent-dmm/api.c
hardware/appa-55ii/api.c
hardware/atten-pps3xxx/api.c
hardware/brymen-dmm/api.c
hardware/cem-dt-885x/api.c
hardware/colead-slm/api.c
hardware/conrad-digi-35-cpu/api.c
hardware/demo/demo.c
hardware/fluke-dmm/api.c
hardware/fx2lafw/api.c
hardware/gmc-mh-1x-2x/api.c
hardware/kecheng-kc-330b/api.c
hardware/lascar-el-usb/api.c
hardware/norma-dmm/api.c
hardware/openbench-logic-sniffer/api.c
hardware/saleae-logic16/api.c
hardware/teleinfo/api.c
hardware/tondaj-sl-814/api.c
hardware/uni-t-ut32x/api.c
hardware/victor-dmm/api.c
hardware/zeroplus-logic-cube/api.c

index 99176ff98c7f3bd91767492406d84c053c8860c7..0c743b329ef8d58eea5af0d4a738b8e90acb52df 100644 (file)
@@ -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,
index 8e7ec36a3a373ee35590f6cadc20f1e5b359ff86..73c71af30517185afce75935af5d20cd6694a1f0 100644 (file)
@@ -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,
index 514ec75630a5a0dc8d177eceeef34704024e0ad0..c7e976011a0c1f878e8da708407bd40cfc481ae7 100644 (file)
@@ -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,
index 4b43e3d7f015d2b7675cb5b317e6db6b96619476..cd11cc5e25049353ec7ba724aaf29a8b8c572944 100644 (file)
@@ -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,
index e1e4b2e4895abb295fdabebc6d787ca857220f2f..1e036355b01f5bfe448c52d14bf63c2f8d450cbd 100644 (file)
@@ -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,
index 99455917e31695e54706b017d0ced55877c8b091..b24198ccac4bc7f4b94d6f2a56c4771a6b3a25fe 100644 (file)
@@ -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,
index 0887de297eee23c4a88e5f22939915dba6765015..bab100dc441b08ecb724315ddc7ac3883258e5d4 100644 (file)
@@ -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,
index 433f35229cdb6f284a9c539d3a6c8da93f129977..a3e85c341108a395dd12e642736c7a074c49ade3 100644 (file)
@@ -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,
index 0cb0c11557c201c94740f324bc13ebfb9b0ae5fc..08cd62f222500184b862c56c752e24a194ff71f1 100644 (file)
@@ -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,
index 29c1887e9ac6c2ac307ba1f9e8509cd5aed96625..4ba888c4e796764ae4802f03d9675357063d3e32 100644 (file)
@@ -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,
index 6b16c2ec6e1215066c507c7288dd964a25f2ecd9..f2f6018d81fb8ecc9072773133f5fb17a8742de2 100644 (file)
@@ -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,
index d9e647d12f682818dda54d23133db5de601cdb9e..75f323453257f9a486a008235aed33891905eaab 100644 (file)
@@ -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,
index bf5654cbdf61f245aba3c5b0e872ad70652f2302..96695c27062944ee11a813d5ec8d7bb768f5c0dc 100644 (file)
@@ -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,
index 27a4db5e5d846ec579c9cbd3622cfaf83204ce19..9736eb27b735b7f9cc22d696f01d142ad2d276d8 100644 (file)
@@ -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,
index 385329945e4faadb96d9ce9b5793d96352f57702..af38e4ff8449be2cda322a5f409bbefda988f70e 100644 (file)
@@ -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,
index d2815f63a880c420f8c9c9d0d5ad1883b0a9cc98..96de1bdf48ebadee9262e9dd12407963eaccae9a 100644 (file)
@@ -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,
index ffbabf0694b918d6ecabe4d97214113477708a77..c29b561e4c09babed3b1cc06989cc1916baf24e8 100644 (file)
@@ -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,
index 2ed95402fd966f26ad7ba191dafa04b5a7ae5b51..2d89e89b56fc5dc78cfb0091b5f13f27d2808594 100644 (file)
@@ -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,
index 84f8719823c4003ac48ce4b36e01ccbc1dccdd07..4fd89f44e03b2d4ce104edfbe0cee8059ee537fa 100644 (file)
@@ -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,
index 0346276838e38d2cc37c0f4b9cb3c44a6275d195..e32bb699a58fbd162cfb136f5d66b47182690ca0 100644 (file)
@@ -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,
index 56804f22d45aef98b7f395221b408df9cb3fec1c..f2e6724d4e36fed12603e31f730454cc92cb9440 100644 (file)
@@ -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,