]> sigrok.org Git - libsigrok.git/commitdiff
s/clear_instances/dev_clear/.
authorUwe Hermann <redacted>
Fri, 31 May 2013 14:09:57 +0000 (16:09 +0200)
committerUwe Hermann <redacted>
Sun, 2 Jun 2013 14:56:41 +0000 (16:56 +0200)
Consistently use the same name for the dev_clear() API callback
everywhere.

19 files changed:
hardware/agilent-dmm/api.c
hardware/alsa/api.c
hardware/asix-sigma/asix-sigma.c
hardware/brymen-dmm/api.c
hardware/chronovu-la8/api.c
hardware/colead-slm/api.c
hardware/demo/demo.c
hardware/fluke-dmm/api.c
hardware/fx2lafw/fx2lafw.c
hardware/hantek-dso/api.c
hardware/lascar-el-usb/api.c
hardware/mic-985xx/api.c
hardware/nexus-osciprime/api.c
hardware/rigol-ds1xx2/api.c
hardware/serial-dmm/api.c
hardware/tondaj-sl-814/api.c
hardware/uni-t-dmm/api.c
hardware/victor-dmm/api.c
hardware/zeroplus-logic-cube/api.c

index 41e3075db12ad5542680398092a5b019da3a74b1..34fa92ad507db894c1a96ad3558d170859404b57 100644 (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,
index 2d4da2631ec4c4dff483795dcc72d43cb74004b9..dd5588dd4ff11c10d92e5ec6c96eb7f7db0bbad0 100644 (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,
index a0975776be0490fc7e7dd229c7e3171affe26b7e..f542b536009b223f67b67f1dc5862f8388b01c38 100644 (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,
index fc371a793829a7a4107535f9f0a215393be3a74d..7302243e6a2136f6fd3bbafe3a35ba31a7e5acf7 100644 (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,
index cbf91df3040eb738386ae36ce87c646fd531226f..ec4bf35f03ebc29d44fea57fbb78960bdfdaf97f 100644 (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,
index 4406402979551d5f60512cc38c36342bff35863b..acf0c6eb1c27707bb6bbd68b1e9c444caf38ddfe 100644 (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,
index 93d47c29e7d8cc087a6cf0fa76f9203bdd020200..69f48f12d1c6e5a10eee4d4adcb353462de61c7d 100644 (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,
index 20021d77393a057e566437de37a5669c5250e6ae..4dd49c19c1525466c111f96a4e75f6e92cdf1e90 100644 (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,
index 5932e553c47b41f030c9e727acb36dbb17eed671..2260cddfc3508f781fbb37fa23db63eb5a61884a 100644 (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,
index 6ac9ba616cb09ae6c5d13a2aff923e6acf440c4f..3a342efcfe9ca511e36d0dcdbfb0508863990ad1 100644 (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,
index d2eaecdeb9e25c7d0567a56b7160aba8312cce05..464eb6b1048cc1a922683e3f44c4dead0327b054 100644 (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,
index 858f2a3e92c5c2f0b651962635ce402c731a9ddc..fa14e2f15a833415a5ec4d0cda901ca909d38322 100644 (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, \
index b6d1a60b08235ad73e682b8d80e4961d54670725..e1f2d0767a0be615321986223db3cb1a60a64f87 100644 (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,
index 04d3f0aecd4c5845741eb9057f99e3e6235aeeeb..e6e923ccfb7f41f2c78f448e9af1994c8f2a173d 100644 (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,
index b0c097cde51eabce1c673ee0508d467adb71f6aa..5bf63b4f30b8b430f7ad936b98d93633529bfb03 100644 (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, \
index 36a884a533a1b7ab7dd9a147df6be04ee786bf13..4af876485c8f0e1999eb16fde81b345e66d104b2 100644 (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,
index 4570e5268b2c07aeee2cfc2bb01cc873b0651a54..f553b3ac426e6f771833d325adbca3d30ae08478 100644 (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, \
index 41edc1d804ed1850f70d2dfe8e71b195fb0f9c8f..e50e338104b2617f350120b8b4a03ebc58ffd773 100644 (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,
index 2117afbc4d29be633face6912c591e2da881dc59..637f22ce93f3896cf18e42fa5ede69e48f3cf547 100644 (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,