]> sigrok.org Git - libsigrok.git/commitdiff
Drop unnecessary struct sr_dev_driver forward declarations
authorLars-Peter Clausen <redacted>
Sun, 8 May 2016 12:26:56 +0000 (14:26 +0200)
committerUwe Hermann <redacted>
Tue, 17 May 2016 21:38:05 +0000 (23:38 +0200)
Most drivers have a forward declaration to their sr_dev_driver struct at
the beginning of the driver file. This is due to historic reasons and often
no longer required. So remove all the unnecessary forward declarations.

Some drivers still require the forward declaration, but only reference the
driver struct from within the driver scan() callback. Since the driver
struct is passed to the scan callback replace the references to the global
variable with the local parameter. In some cases this requires adding the
parameter to some of the helper functions that are called from the scan()
callback.

Signed-off-by: Lars-Peter Clausen <redacted>
46 files changed:
src/hardware/agilent-dmm/api.c
src/hardware/appa-55ii/api.c
src/hardware/arachnid-labs-re-load-pro/api.c
src/hardware/asix-sigma/api.c
src/hardware/atten-pps3xxx/api.c
src/hardware/baylibre-acme/api.c
src/hardware/beaglelogic/api.c
src/hardware/brymen-bm86x/api.c
src/hardware/brymen-dmm/api.c
src/hardware/cem-dt-885x/api.c
src/hardware/chronovu-la/api.c
src/hardware/colead-slm/api.c
src/hardware/conrad-digi-35-cpu/api.c
src/hardware/demo/demo.c
src/hardware/deree-de5000/api.c
src/hardware/fluke-dmm/api.c
src/hardware/ftdi-la/api.c
src/hardware/fx2lafw/api.c
src/hardware/gmc-mh-1x-2x/api.c
src/hardware/hantek-6xxx/api.c
src/hardware/hantek-dso/api.c
src/hardware/hantek-dso/dso.c
src/hardware/hung-chang-dso-2100/api.c
src/hardware/ikalogic-scanalogic2/api.c
src/hardware/ikalogic-scanalogic2/protocol.c
src/hardware/ikalogic-scanalogic2/protocol.h
src/hardware/ikalogic-scanaplus/api.c
src/hardware/kecheng-kc-330b/api.c
src/hardware/kecheng-kc-330b/protocol.c
src/hardware/korad-kaxxxxp/api.c
src/hardware/lascar-el-usb/api.c
src/hardware/lecroy-logicstudio/api.c
src/hardware/link-mso19/api.c
src/hardware/link-mso19/protocol.c
src/hardware/manson-hcs-3xxx/api.c
src/hardware/motech-lps-30x/api.c
src/hardware/openbench-logic-sniffer/api.c
src/hardware/pipistrello-ols/api.c
src/hardware/saleae-logic16/api.c
src/hardware/teleinfo/api.c
src/hardware/testo/api.c
src/hardware/tondaj-sl-814/api.c
src/hardware/uni-t-ut32x/api.c
src/hardware/uni-t-ut32x/protocol.c
src/hardware/victor-dmm/api.c
src/hardware/zeroplus-logic-cube/api.c

index b5ba7ae2e9851134b9561ef9ce4d4cdd5c25a59f..bb7c53e48aefa683011b537331937e7c18840207 100644 (file)
@@ -70,8 +70,6 @@ static const struct agdmm_profile supported_agdmm[] = {
        ALL_ZERO
 };
 
-SR_PRIV struct sr_dev_driver agdmm_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
index 09b24cb2d78f7ed9a71516c59a3fb3eea6b29900..4c297c18226d4fe107dda8fa6674ef35d25801cf 100644 (file)
@@ -42,8 +42,6 @@ static const char *data_sources[] = {
        "Memory",
 };
 
-SR_PRIV struct sr_dev_driver appa_55ii_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
index 248d654905d3301df2ab000a71a29b2360dc7d17..6683e28325e6c9bad95392e3cd09c19a257b3b67 100644 (file)
@@ -56,8 +56,6 @@ static const uint32_t devopts_cg[] = {
        SR_CONF_UNDER_VOLTAGE_CONDITION_ACTIVE | SR_CONF_GET,
 };
 
-SR_PRIV struct sr_dev_driver arachnid_labs_re_load_pro_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
@@ -133,7 +131,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        sdi->vendor = g_strdup("Arachnid Labs");
        sdi->model = g_strdup("Re:load Pro");
        sdi->version = g_strdup(buf + 8);
-       sdi->driver = &arachnid_labs_re_load_pro_driver_info;
+       sdi->driver = di;
        sdi->inst_type = SR_INST_SERIAL;
        sdi->conn = serial;
 
index c9aceaec1bfd591678a005d6f589b469a7fbd012..fb0c695219448073aff66cfa8a9f86db1e1b0774 100644 (file)
@@ -26,8 +26,6 @@
 #include <config.h>
 #include "protocol.h"
 
-SR_PRIV struct sr_dev_driver asix_sigma_driver_info;
-
 /*
  * Channel numbers seem to go from 1-16, according to this image:
  * http://tools.asix.net/img/sigma_sigmacab_pins_720.jpg
index 82a1cdaac2c923de13f880cba784fb3c2fd0c587..e0e38389652a60b615bdd4f653a34666f7381229 100644 (file)
@@ -75,8 +75,6 @@ static const struct pps_model models[] = {
        },
 };
 
-SR_PRIV struct sr_dev_driver atten_pps3203_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options, int modelid)
 {
        struct sr_dev_inst *sdi;
index cfc8e6c80590f8bb81e0cadb1bde762d0d7d1129..6665369161002c3d4bb45c5cf2c9754dda0f72eb 100644 (file)
@@ -22,8 +22,6 @@
 #include <time.h>
 #include <sys/timerfd.h>
 
-SR_PRIV struct sr_dev_driver baylibre_acme_driver_info;
-
 static const uint32_t devopts[] = {
        SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
index 37468ac39678388b843a575ca4662061a7c90866..e862d99ea90ea84af2a36ff032f9a642d3249466 100644 (file)
@@ -21,8 +21,6 @@
 #include "protocol.h"
 #include "beaglelogic.h"
 
-SR_PRIV struct sr_dev_driver beaglelogic_driver_info;
-
 /* Scan options */
 static const uint32_t scanopts[] = {
        SR_CONF_NUM_LOGIC_CHANNELS,
index afed5771b7062b92be643a9d8d7d290b6c2e4d90..9d1600e713f6bf011d70572a86a2e25ff4b7437b 100644 (file)
@@ -33,8 +33,6 @@ static const uint32_t devopts[] = {
        SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
 };
 
-SR_PRIV struct sr_dev_driver brymen_bm86x_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        GSList *usb_devices, *devices, *l;
index 4d70e9edb8cd98dd399bd8b85406d25a7845d3eb..b38ba37585a335054f829a9365fc69107e920be6 100644 (file)
@@ -32,10 +32,8 @@ static const uint32_t devopts[] = {
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
-SR_PRIV struct sr_dev_driver brymen_bm857_driver_info;
-static struct sr_dev_driver *di = &brymen_bm857_driver_info;
-
-static GSList *brymen_scan(const char *conn, const char *serialcomm)
+static GSList *brymen_scan(struct sr_dev_driver *di, const char *conn,
+       const char *serialcomm)
 {
        struct sr_dev_inst *sdi;
        struct dev_context *devc;
@@ -118,10 +116,10 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
        if (serialcomm) {
                /* Use the provided comm specs. */
-               devices = brymen_scan(conn, serialcomm);
+               devices = brymen_scan(di, conn, serialcomm);
        } else {
                /* But 9600/8n1 should work all of the time. */
-               devices = brymen_scan(conn, "9600/8n1/dtr=1/rts=1");
+               devices = brymen_scan(di, conn, "9600/8n1/dtr=1/rts=1");
        }
 
        return devices;
index e31eaf2af190f5a8af39e334caa337c6addeedcd..6134ba6dc5b4e323b25b91313b8d3e80f0ad7cb7 100644 (file)
@@ -69,8 +69,6 @@ static const char *data_sources[] = {
        "Memory",
 };
 
-SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
index 0508250cd501296ac68ba85a31cf921058cd360c..329b45bd305148165a68e6b1a647a9002a9c56e8 100644 (file)
@@ -21,9 +21,6 @@
 #include <config.h>
 #include "protocol.h"
 
-SR_PRIV struct sr_dev_driver chronovu_la_driver_info;
-static struct sr_dev_driver *di = &chronovu_la_driver_info;
-
 static const uint32_t drvopts[] = {
        SR_CONF_LOGIC_ANALYZER,
 };
@@ -64,9 +61,9 @@ static int dev_clear(const struct sr_dev_driver *di)
        return std_dev_clear(di, clear_helper);
 }
 
-static int add_device(int model, struct libusb_device_descriptor *des,
-       const char *serial_num, const char *connection_id,
-       libusb_device *usbdev, GSList **devices)
+static int add_device(struct sr_dev_driver *di, int model,
+       struct libusb_device_descriptor *des, const char *serial_num,
+       const char *connection_id, libusb_device *usbdev, GSList **devices)
 {
        int ret;
        unsigned int i;
@@ -228,7 +225,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                       libusb_get_bus_number(devlist[i]),
                       libusb_get_device_address(devlist[i]), connection_id);
 
-               if ((ret = add_device(model, &des, serial_num, connection_id,
+               if ((ret = add_device(di, model, &des, serial_num, connection_id,
                                        devlist[i], &devices)) < 0) {
                        sr_dbg("Failed to add device: %d.", ret);
                }
index ac13da99d764f560325bb31615ad1b716d2320fd..f83ca1c94aa253ca885a27c76f19fdb8bc9ef52d 100644 (file)
@@ -42,8 +42,6 @@ static const uint32_t devopts[] = {
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
-SR_PRIV struct sr_dev_driver colead_slm_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
index 708afa22cc0c70d368bd9f648dc9631b7b62253b..20382feba9d4c6ed7ce8cec6168a9853b139b67d 100644 (file)
@@ -39,8 +39,6 @@ static const uint32_t devopts[] = {
        SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_SET,
 };
 
-SR_PRIV struct sr_dev_driver conrad_digi_35_cpu_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
index e70cf966991aa8fbbdfe386ab913e02ba4055498..cf520ca4b6a59cef15144590bc7e682469cc179c 100644 (file)
@@ -175,8 +175,6 @@ static const uint8_t pattern_sigrok[] = {
        0xbe, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 };
 
-SR_PRIV struct sr_dev_driver demo_driver_info;
-
 static int dev_acquisition_stop(struct sr_dev_inst *sdi);
 
 static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate)
index 7fca5c6008b29c74aa14d4091e7a97948ffaefd9..bbdb7b70a14048583ffd2cf31055d08dd6314e2d 100644 (file)
@@ -37,8 +37,6 @@ static void std_dev_attach(struct sr_dev_driver *di, struct sr_dev_inst *sdi)
 
 #define LOG_PREFIX "deree-de5000"
 
-SR_PRIV struct sr_dev_driver deree_de5000_driver_info;
-
 static int dev_clear(const struct sr_dev_driver *di)
 {
        return std_dev_clear(di, es51919_serial_clean);
index 61da487b629ba7a5d05a62a4367c59c19b225dbe..f0472411108ce4bedd651908dd55af2621000137 100644 (file)
@@ -39,8 +39,6 @@ static const uint32_t devopts[] = {
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
-SR_PRIV struct sr_dev_driver flukedmm_driver_info;
-
 static const char *scan_conn[] = {
        /* 287/289 */
        "115200/8n1",
index c49c9c7d6ef8a2b5382699b77579eb923ba6a80e..ad58c501056b7c390bad3fe07c84ca9792ad3129 100644 (file)
@@ -24,8 +24,6 @@
 #include "libsigrok-internal.h"
 #include "protocol.h"
 
-SR_PRIV struct sr_dev_driver ftdi_la_driver_info;
-
 static const uint32_t scanopts[] = {
        SR_CONF_CONN,
 };
index 54db1f36510802b2b609130b8839c513fee63bfc..74293597bab1af9e316dfb37f0e8f25a641939ca 100644 (file)
@@ -207,8 +207,6 @@ static const uint64_t dslogic_samplerates[] = {
        SR_MHZ(400),
 };
 
-SR_PRIV struct sr_dev_driver fx2lafw_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
index 378b6263bf32c6cfd4b39e53c20bd22c4572d23b..049907ae61f100032aff4fbea2ce95ace49e5445 100644 (file)
@@ -32,9 +32,6 @@
 #define SERIALCOMM_2X "9600/8n1/dtr=1/rts=1/flow=0"
 #define VENDOR_GMC "Gossen Metrawatt"
 
-SR_PRIV struct sr_dev_driver gmc_mh_1x_2x_rs232_driver_info;
-SR_PRIV struct sr_dev_driver gmc_mh_2x_bd232_driver_info;
-
 static const uint32_t scanopts[] = {
        SR_CONF_CONN,
        SR_CONF_SERIALCOMM,
index 1bc0dbff776e4b129084d4e3c665d80a975dc4c8..1227e7b9e24cb11dde2ca161ef0a4e5632f28993 100644 (file)
@@ -74,13 +74,12 @@ static const uint64_t vdivs[][2] = {
        VDIV_VALUES
 };
 
-SR_PRIV struct sr_dev_driver hantek_6xxx_driver_info;
-
 static int read_channel(const struct sr_dev_inst *sdi, uint32_t amount);
 
 static int dev_acquisition_stop(struct sr_dev_inst *sdi);
 
-static struct sr_dev_inst *hantek_6xxx_dev_new(const struct hantek_6xxx_profile *prof)
+static struct sr_dev_inst *hantek_6xxx_dev_new(struct sr_dev_driver *di,
+       const struct hantek_6xxx_profile *prof)
 {
        struct sr_dev_inst *sdi;
        struct sr_channel *ch;
@@ -93,7 +92,7 @@ static struct sr_dev_inst *hantek_6xxx_dev_new(const struct hantek_6xxx_profile
        sdi->status = SR_ST_INITIALIZING;
        sdi->vendor = g_strdup(prof->vendor);
        sdi->model = g_strdup(prof->model);
-       sdi->driver = &hantek_6xxx_driver_info;
+       sdi->driver = di;
 
        for (i = 0; i < ARRAY_SIZE(channel_names); i++) {
                ch = sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE, channel_names[i]);
@@ -223,7 +222,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                                /* Device matches the pre-firmware profile. */
                                prof = &dev_profiles[j];
                                sr_dbg("Found a %s %s.", prof->vendor, prof->model);
-                               sdi = hantek_6xxx_dev_new(prof);
+                               sdi = hantek_6xxx_dev_new(di, prof);
                                sdi->connection_id = g_strdup(connection_id);
                                devices = g_slist_append(devices, sdi);
                                devc = sdi->priv;
@@ -242,7 +241,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                                /* Device matches the post-firmware profile. */
                                prof = &dev_profiles[j];
                                sr_dbg("Found a %s %s.", prof->vendor, prof->model);
-                               sdi = hantek_6xxx_dev_new(prof);
+                               sdi = hantek_6xxx_dev_new(di, prof);
                                sdi->connection_id = g_strdup(connection_id);
                                sdi->status = SR_ST_INACTIVE;
                                devices = g_slist_append(devices, sdi);
index 7faaa16613dc583780d60ab46a654402568e05e0..f8fdc1a4758cfbef83deeecf28771e352e19cde7 100644 (file)
@@ -160,11 +160,10 @@ static const char *coupling[] = {
        "GND",
 };
 
-SR_PRIV struct sr_dev_driver hantek_dso_driver_info;
-
 static int dev_acquisition_stop(struct sr_dev_inst *sdi);
 
-static struct sr_dev_inst *dso_dev_new(const struct dso_profile *prof)
+static struct sr_dev_inst *dso_dev_new(struct sr_dev_driver *di,
+       const struct dso_profile *prof)
 {
        struct sr_dev_inst *sdi;
        struct sr_channel *ch;
@@ -177,7 +176,7 @@ static struct sr_dev_inst *dso_dev_new(const struct dso_profile *prof)
        sdi->status = SR_ST_INITIALIZING;
        sdi->vendor = g_strdup(prof->vendor);
        sdi->model = g_strdup(prof->model);
-       sdi->driver = &hantek_dso_driver_info;
+       sdi->driver = di;
 
        /*
         * Add only the real channels -- EXT isn't a source of data, only
@@ -209,7 +208,7 @@ static struct sr_dev_inst *dso_dev_new(const struct dso_profile *prof)
        devc->triggersource = g_strdup(DEFAULT_TRIGGER_SOURCE);
        devc->triggerposition = DEFAULT_HORIZ_TRIGGERPOS;
        sdi->priv = devc;
-       drvc = hantek_dso_driver_info.context;
+       drvc = di->context;
        drvc->instances = g_slist_append(drvc->instances, sdi);
 
        return sdi;
@@ -314,7 +313,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                                /* Device matches the pre-firmware profile. */
                                prof = &dev_profiles[j];
                                sr_dbg("Found a %s %s.", prof->vendor, prof->model);
-                               sdi = dso_dev_new(prof);
+                               sdi = dso_dev_new(di, prof);
                                sdi->connection_id = g_strdup(connection_id);
                                devices = g_slist_append(devices, sdi);
                                devc = sdi->priv;
@@ -333,7 +332,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                                /* Device matches the post-firmware profile. */
                                prof = &dev_profiles[j];
                                sr_dbg("Found a %s %s.", prof->vendor, prof->model);
-                               sdi = dso_dev_new(prof);
+                               sdi = dso_dev_new(di, prof);
                                sdi->connection_id = g_strdup(connection_id);
                                sdi->status = SR_ST_INACTIVE;
                                devices = g_slist_append(devices, sdi);
index 8561ac3ded1494474bd48564cee18cc15e734874..06037e29278e775ad5d13e4e8ec0811709d6d25d 100644 (file)
@@ -29,8 +29,6 @@
 
 #define NUM_CHANNELS 2
 
-extern struct sr_dev_driver hantek_dso_driver_info;
-
 static int send_begin(const struct sr_dev_inst *sdi)
 {
        struct sr_usb_dev_inst *usb;
@@ -111,7 +109,7 @@ err:
 SR_PRIV int dso_open(struct sr_dev_inst *sdi)
 {
        struct dev_context *devc;
-       struct drv_context *drvc = hantek_dso_driver_info.context;
+       struct drv_context *drvc = sdi->driver->context;
        struct sr_usb_dev_inst *usb;
        struct libusb_device_descriptor des;
        libusb_device **devlist;
index 6f0910fe867122aad653ead933244322d0b31f36..dc575e4f363e9f1c0ee2a83238738d3ed6bfa25f 100644 (file)
@@ -22,8 +22,6 @@
 #include <string.h>
 #include "protocol.h"
 
-SR_PRIV struct sr_dev_driver hung_chang_dso_2100_driver_info;
-
 static const uint32_t scanopts[] = {
        SR_CONF_CONN,
 };
index a36acf071ada07e975f0efa643b76baadb368092..ad98cc9868eb24371454b45b3ce29def7d9c87f7 100644 (file)
@@ -52,8 +52,6 @@ static const char *channel_names[] = {
        "0", "1", "2", "3",
 };
 
-SR_PRIV struct sr_dev_driver ikalogic_scanalogic2_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        GSList *usb_devices, *devices, *l;
@@ -79,7 +77,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        for (l = usb_devices; l; l = l->next) {
                usb = l->data;
 
-               if ((ret = sl2_get_device_info(*usb, &dev_info)) < 0) {
+               if ((ret = sl2_get_device_info(di, *usb, &dev_info)) < 0) {
                        sr_warn("Failed to get device information: %d.", ret);
                        sr_usb_dev_inst_free(usb);
                        continue;
index f18e2924ab5d7c423fb72b7011a57b23fbb6d1f1..621fb000e53a161dca0409847296a3fe4b7129d7 100644 (file)
@@ -20,8 +20,6 @@
 #include <config.h>
 #include "protocol.h"
 
-extern struct sr_dev_driver ikalogic_scanalogic2_driver_info;
-
 extern uint64_t sl2_samplerates[NUM_SAMPLERATES];
 
 static void stop_acquisition(struct sr_dev_inst *sdi)
@@ -627,14 +625,14 @@ SR_PRIV void sl2_calculate_trigger_samples(const struct sr_dev_inst *sdi)
        devc->post_trigger_bytes = post_trigger_bytes;
 }
 
-SR_PRIV int sl2_get_device_info(struct sr_usb_dev_inst usb,
-               struct device_info *dev_info)
+SR_PRIV int sl2_get_device_info(struct sr_dev_driver *di,
+               struct sr_usb_dev_inst usb, struct device_info *dev_info)
 {
        struct drv_context *drvc;
        uint8_t buffer[PACKET_LENGTH];
        int ret;
 
-       drvc = ikalogic_scanalogic2_driver_info.context;
+       drvc = di->context;
 
        if (!dev_info)
                return SR_ERR_ARG;
index 607933755cd93ca3aaa6f91567acef959081f852..d7a273574d78276d1504dbb4f616a62d16d42dfa 100644 (file)
@@ -227,8 +227,8 @@ SR_PRIV int sl2_set_capture_ratio(const struct sr_dev_inst *sdi,
 SR_PRIV int sl2_set_after_trigger_delay(const struct sr_dev_inst *sdi,
                                        uint64_t after_trigger_delay);
 SR_PRIV void sl2_calculate_trigger_samples(const struct sr_dev_inst *sdi);
-SR_PRIV int sl2_get_device_info(struct sr_usb_dev_inst usb,
-               struct device_info *dev_info);
+SR_PRIV int sl2_get_device_info(struct sr_dev_driver *di,
+               struct sr_usb_dev_inst usb, struct device_info *dev_info);
 SR_PRIV int sl2_transfer_in(libusb_device_handle *dev_handle, uint8_t *data);
 SR_PRIV int sl2_transfer_out(libusb_device_handle *dev_handle, uint8_t *data);
 
index bb8689bd4ae11adf24d01b7e00c00ee9fe768ecc..045476243e8ce7c1f5fa2baf901e84085f7cbc8c 100644 (file)
@@ -44,8 +44,6 @@ static const char *channel_names[] = {
 /* Note: The IKALOGIC ScanaPLUS always samples at 100MHz. */
 static const uint64_t samplerates[1] = { SR_MHZ(100) };
 
-SR_PRIV struct sr_dev_driver ikalogic_scanaplus_driver_info;
-
 static int dev_acquisition_stop(struct sr_dev_inst *sdi);
 
 static void clear_helper(void *priv)
index b3fc1321fb70d6479245830a95edc47b1f06c4d3..1cc84240fd8e9f4b768579dd36041f63885eb4a6 100644 (file)
@@ -61,8 +61,6 @@ static const char *data_sources[] = {
        "Memory",
 };
 
-SR_PRIV struct sr_dev_driver kecheng_kc_330b_driver_info;
-
 static int scan_kecheng(struct sr_dev_driver *di,
                struct sr_usb_dev_inst *usb, char **model)
 {
index e1c8da17b910b4e25b703c923760591939976fa9..644d9677784addd0f173301250179a47a2b99065 100644 (file)
@@ -20,8 +20,6 @@
 #include <config.h>
 #include <string.h>
 #include "protocol.h"
-
-extern struct sr_dev_driver kecheng_kc_330b_driver_info;
 extern const uint64_t kecheng_kc_330b_sample_intervals[][2];
 
 SR_PRIV int kecheng_kc_330b_handle_events(int fd, int revents, void *cb_data)
index e008cfe4a4282d230a0674f780372b9f6c303833..8316690fc9c5f6068b6df46c140c437aea21fc16 100644 (file)
@@ -62,8 +62,6 @@ static const struct korad_kaxxxxp_model models[] = {
        ALL_ZERO
 };
 
-SR_PRIV struct sr_dev_driver korad_kaxxxxp_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
index 960a97ea425983e668e75051fa6d288bb0ca680e..ad2d18b8db5572a4212b636fe3c28768316e05ce 100644 (file)
@@ -24,8 +24,6 @@
 #include "libsigrok-internal.h"
 #include "protocol.h"
 
-SR_PRIV struct sr_dev_driver lascar_el_usb_driver_info;
-
 static const uint32_t scanopts[] = {
        SR_CONF_CONN,
 };
index fd73a700e50c6b85e4a7ad099b87f24b4f93b0c2..ae73738a6f0b3d7cdca1cffb7d0b230a05cd2974 100644 (file)
@@ -71,8 +71,6 @@ static const uint64_t samplerates[] = {
        SR_MHZ(500),
 };
 
-SR_PRIV struct sr_dev_driver lecroy_logicstudio_driver_info;
-
 static struct sr_dev_inst *create_device(struct sr_dev_driver *di,
                struct sr_usb_dev_inst *usb, enum sr_dev_inst_status status,
                int64_t fw_updated)
index c3abb0ae8de738e653c3d5a3977f16767d963bf5..f2b372eb303c89c2bf1a9b00611cac194444acaa 100644 (file)
@@ -50,8 +50,6 @@ static const uint64_t samplerates[] = {
        SR_HZ(100),
 };
 
-SR_PRIV struct sr_dev_driver link_mso19_driver_info;
-
 /* TODO: Use sr_dev_inst to store connection handle & use std_dev_clear(). */
 static int dev_clear(const struct sr_dev_driver *di)
 {
index 8d4f9056d6a51a6ea29a738abac2ba19bcbbd2b8..ae4d16153187a88a473dec1f855226dd7ce56d34 100644 (file)
@@ -30,8 +30,6 @@
 static const char mso_head[] = { 0x40, 0x4c, 0x44, 0x53, 0x7e };
 static const char mso_foot[] = { 0x7e };
 
-extern SR_PRIV struct sr_dev_driver link_mso19_driver_info;
-
 SR_PRIV int mso_send_control_message(struct sr_serial_dev_inst *serial,
                                     uint16_t payload[], int n)
 {
index 4a253a18ebfc40587efce9b661d2645a73bcb35f..feeef963a93b06fe2bd5649108d8f3ed23c78585 100644 (file)
@@ -73,8 +73,6 @@ static const struct hcs_model models[] = {
        ALL_ZERO
 };
 
-SR_PRIV struct sr_dev_driver manson_hcs_3xxx_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        int i, model_id;
index 57befbfd6edf6e9c06e5b2c8bead3e2266a52c84..7194f313af2c4396c3ef208bb1b132bebfab14a2 100644 (file)
@@ -28,9 +28,6 @@
 #include <math.h>
 #include <string.h>
 #include "protocol.h"
-
-/* Forward declarations */
-SR_PRIV struct sr_dev_driver motech_lps_301_driver_info;
 SR_PRIV int lps_read_reply(struct sr_serial_dev_inst *serial, char **buf, int *buflen);
 SR_PRIV int lps_send_va(struct sr_serial_dev_inst *serial, const char *fmt, va_list args);
 SR_PRIV int lps_cmd_ok(struct sr_serial_dev_inst *serial, const char *fmt, ...);
index a70e3168bd8a3cea86b408924ff3b7dc5c2bacdc..d8f7cc4d47041a13aadc9d7f5117c7e569c01167 100644 (file)
@@ -85,8 +85,6 @@ static const uint64_t samplerates[] = {
 
 #define RESPONSE_DELAY_US (10 * 1000)
 
-SR_PRIV struct sr_dev_driver ols_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_config *src;
index b9da2f98ab55891d5f31c74b747261dcde595dc4..dd8155867d78639ba48d5eaf6016d60efc7b1ba2 100644 (file)
@@ -75,8 +75,6 @@ static const uint64_t samplerates[] = {
        SR_HZ(1),
 };
 
-SR_PRIV struct sr_dev_driver p_ols_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
index 98bf26bd04c6d90760d2153f7db93d16a9f62d21..4c120b1ce3b037d790917bbf14bb9ce905ff4f75 100644 (file)
@@ -39,8 +39,6 @@
 #define MAX_RENUM_DELAY_MS     3000
 #define NUM_SIMUL_TRANSFERS    32
 
-SR_PRIV struct sr_dev_driver saleae_logic16_driver_info;
-
 static const uint32_t scanopts[] = {
        SR_CONF_CONN,
 };
index 4bccde017a8522cbb8c8a0c8928da54973dea7c9..c9ea8c7d2dd4b3880a60ac72c71d65bd099bf31d 100644 (file)
@@ -36,8 +36,6 @@ static const uint32_t devopts[] = {
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
-SR_PRIV struct sr_dev_driver teleinfo_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
index 2ae985dbc00885decb2c0dab8d7a7a11af6b43aa..a2eae04d805b222e593ef2ad818cad7052bf8534 100644 (file)
@@ -22,8 +22,6 @@
 #include "protocol.h"
 
 #define SERIALCOMM "115200/8n1"
-
-SR_PRIV struct sr_dev_driver testo_driver_info;
 static int dev_acquisition_stop(struct sr_dev_inst *sdi);
 
 static const uint32_t scanopts[] = {
index 8628ea3023485e48cfa2dd9b8c8fb305f9dfbf0e..4caae64202929578adea7a4aa066b2a08e9d5981 100644 (file)
@@ -39,8 +39,6 @@ static const uint32_t devopts[] = {
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
-SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
index b6385705937c685c3cc5bcc763c7747e2d30dbb0..aed53aad337b01de5030cc2bb1d0f01247fc90c9 100644 (file)
@@ -37,8 +37,6 @@ static const char *data_sources[] = {
        "Memory",
 };
 
-SR_PRIV struct sr_dev_driver uni_t_ut32x_driver_info;
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
index 01fa6f72d37c03e75c54a63f9c8c51648341414a..4287e3932751610e324409bc06446117404909a5 100644 (file)
@@ -22,8 +22,6 @@
 #include <math.h>
 #include "protocol.h"
 
-extern struct sr_dev_driver uni_t_ut32x_driver_info;
-
 static float parse_temperature(unsigned char *buf)
 {
        float temp;
index 9a07cc8309a97b10477a52d39612894a7d150130..a53d8c51a5378bdca2cd44f2dd4cb09c9194e480 100644 (file)
@@ -31,8 +31,6 @@
 #define VICTOR_VENDOR "Victor"
 #define VICTOR_INTERFACE 0
 #define VICTOR_ENDPOINT (LIBUSB_ENDPOINT_IN | 1)
-
-SR_PRIV struct sr_dev_driver victor_dmm_driver_info;
 static int dev_acquisition_stop(struct sr_dev_inst *sdi);
 
 static const uint32_t drvopts[] = {
index 6a593027fba5d472f33d9f5999fd69054d8aa8a5..dd001495828f3147ae5ca08f6ae8934b70a272ba 100644 (file)
@@ -79,8 +79,6 @@ static const char *channel_names[] = {
        "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
 };
 
-SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info;
-
 /*
  * The hardware supports more samplerates than these, but these are the
  * options hardcoded into the vendor's Windows GUI.