]> sigrok.org Git - libsigrok.git/commitdiff
Remove unnecessary std_init() wrapper functions
authorLars-Peter Clausen <redacted>
Sun, 8 May 2016 13:23:13 +0000 (15:23 +0200)
committerUwe Hermann <redacted>
Mon, 9 May 2016 13:10:26 +0000 (15:10 +0200)
Now that the signature of std_init() matches that of the driver init()
callback we can remove all wrapper functions around std_init() and use it
directly as the init() callback.

Signed-off-by: Lars-Peter Clausen <redacted>
55 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/center-3xx/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/gwinstek-gds-800/api.c
src/hardware/hameg-hmo/api.c
src/hardware/hantek-6xxx/api.c
src/hardware/hantek-dso/api.c
src/hardware/hp-3457a/api.c
src/hardware/hung-chang-dso-2100/api.c
src/hardware/ikalogic-scanalogic2/api.c
src/hardware/ikalogic-scanaplus/api.c
src/hardware/kecheng-kc-330b/api.c
src/hardware/kern-scale/api.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/manson-hcs-3xxx/api.c
src/hardware/maynuo-m97/api.c
src/hardware/mic-985xx/api.c
src/hardware/motech-lps-30x/api.c
src/hardware/norma-dmm/api.c
src/hardware/openbench-logic-sniffer/api.c
src/hardware/pipistrello-ols/api.c
src/hardware/rigol-ds/api.c
src/hardware/saleae-logic16/api.c
src/hardware/scpi-pps/api.c
src/hardware/serial-dmm/api.c
src/hardware/sysclk-lwla/api.c
src/hardware/teleinfo/api.c
src/hardware/testo/api.c
src/hardware/tondaj-sl-814/api.c
src/hardware/uni-t-dmm/api.c
src/hardware/uni-t-ut32x/api.c
src/hardware/victor-dmm/api.c
src/hardware/yokogawa-dlm/api.c
src/hardware/zeroplus-logic-cube/api.c
src/session_driver.c

index b7e4a6bdcf0ac8ba6f6a75c55c746c998f8dab14..7bafabc2cf6d33953c3d4a0162732ce7853d3aac 100644 (file)
@@ -72,11 +72,6 @@ static const struct agdmm_profile supported_agdmm[] = {
 
 SR_PRIV struct sr_dev_driver agdmm_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
@@ -243,7 +238,7 @@ SR_PRIV struct sr_dev_driver agdmm_driver_info = {
        .name = "agilent-dmm",
        .longname = "Agilent U12xx series DMMs",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 14b8ea91903b4217d2748e08aa655f06747205de..0574a487d7373bd9f11534e11cd3150147aa568b 100644 (file)
@@ -44,11 +44,6 @@ static const char *data_sources[] = {
 
 SR_PRIV struct sr_dev_driver appa_55ii_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -240,7 +235,7 @@ SR_PRIV struct sr_dev_driver appa_55ii_driver_info = {
        .name = "appa-55ii",
        .longname = "APPA 55II",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 4bbbf243054443c65adb1a0ce25b6dd47788fe30..203515c0fd914fa8bfd0726242b7a36103d6ffda 100644 (file)
@@ -58,11 +58,6 @@ static const uint32_t devopts_cg[] = {
 
 SR_PRIV struct sr_dev_driver arachnid_labs_re_load_pro_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
@@ -369,7 +364,7 @@ SR_PRIV struct sr_dev_driver arachnid_labs_re_load_pro_driver_info = {
        .name = "arachnid-labs-re-load-pro",
        .longname = "Arachnid Labs Re:load Pro",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index cb61b92b2fcac16beea70fbe1b47af33ebf3732c..c9aceaec1bfd591678a005d6f589b469a7fbd012 100644 (file)
@@ -63,11 +63,6 @@ static int dev_clear(const struct sr_dev_driver *di)
        return std_dev_clear(di, sigma_clear_helper);
 }
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
@@ -414,7 +409,7 @@ SR_PRIV struct sr_dev_driver asix_sigma_driver_info = {
        .name = "asix-sigma",
        .longname = "ASIX SIGMA/SIGMA2",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index fea793a1d99ccfb4da8231465454e292396a0d2f..82a1cdaac2c923de13f880cba784fb3c2fd0c587 100644 (file)
@@ -77,11 +77,6 @@ static const struct pps_model models[] = {
 
 SR_PRIV struct sr_dev_driver atten_pps3203_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options, int modelid)
 {
        struct sr_dev_inst *sdi;
@@ -496,7 +491,7 @@ SR_PRIV struct sr_dev_driver atten_pps3203_driver_info = {
        .name = "atten-pps3203",
        .longname = "Atten PPS3203T-3S",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan_3203,
        .dev_list = std_dev_list,
index 9103aeb15a1482d4fd14df89410b9d7496f9289c..cfc8e6c80590f8bb81e0cadb1bde762d0d7d1129 100644 (file)
@@ -53,11 +53,6 @@ static const uint64_t samplerates[] = {
        SR_HZ(1),
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -397,7 +392,7 @@ SR_PRIV struct sr_dev_driver baylibre_acme_driver_info = {
        .name = "baylibre-acme",
        .longname = "BayLibre ACME (Another Cute Measurement Equipment)",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index e28350c1efb146c91887dcfeee27d537bbaa5f0b..37468ac39678388b843a575ca4662061a7c90866 100644 (file)
@@ -60,11 +60,6 @@ static const uint64_t samplerates[] = {
        SR_HZ(1),
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static struct dev_context *beaglelogic_devc_alloc(void)
 {
        struct dev_context *devc;
@@ -367,7 +362,7 @@ SR_PRIV struct sr_dev_driver beaglelogic_driver_info = {
        .name = "beaglelogic",
        .longname = "BeagleLogic",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 88a9a5aac8483589f39c68d831f89d7fee636194..345532e734b6ef981a3fc8e9646e8b6ccd6b3045 100644 (file)
@@ -35,11 +35,6 @@ static const uint32_t devopts[] = {
 
 SR_PRIV struct sr_dev_driver brymen_bm86x_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        GSList *usb_devices, *devices, *l;
@@ -254,7 +249,7 @@ SR_PRIV struct sr_dev_driver brymen_bm86x_driver_info = {
        .name = "brymen-bm86x",
        .longname = "Brymen BM86X",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 9aad650441066ab56d467a6276730dca8e02c982..e9e534dfcede044e9014d552aea44d6b6889f0ab 100644 (file)
@@ -35,11 +35,6 @@ static const uint32_t devopts[] = {
 SR_PRIV struct sr_dev_driver brymen_bm857_driver_info;
 static struct sr_dev_driver *di = &brymen_bm857_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *brymen_scan(const char *conn, const char *serialcomm)
 {
        struct sr_dev_inst *sdi;
@@ -203,7 +198,7 @@ SR_PRIV struct sr_dev_driver brymen_bm857_driver_info = {
        .name = "brymen-bm857",
        .longname = "Brymen BM857",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index c7816ba60a17050fd224eb9a55bcc73214c618e8..f9ecc7cc3484c6438fe3c5b40db74ba5cfcf829f 100644 (file)
@@ -71,11 +71,6 @@ static const char *data_sources[] = {
 
 SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -391,7 +386,7 @@ SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info = {
        .name = "cem-dt-885x",
        .longname = "CEM DT-885x",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index c78825ab0b2727f71bdd6fa8a7a5f9ef01acfd58..40e8dbd66efc40f0402360edbf529bb662bc01a0 100644 (file)
@@ -56,11 +56,6 @@ SR_PRIV const struct center_dev_info center_devs[] = {
        },
 };
 
-static int init(struct sr_context *sr_ctx, int idx)
-{
-       return std_init(center_devs[idx].di, sr_ctx);
-}
-
 static GSList *center_scan(const char *conn, const char *serialcomm, int idx)
 {
        int i;
@@ -203,9 +198,6 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
 }
 
 /* Driver-specific API function wrappers */
-#define HW_INIT(X) \
-static int init_##X(struct sr_dev_driver *d, \
-       struct sr_context *sr_ctx) { (void)d; return init(sr_ctx, X); }
 #define HW_SCAN(X) \
 static GSList *scan_##X(struct sr_dev_driver *d, GSList *options) { \
        (void)d; return scan(options, X); }
@@ -215,14 +207,13 @@ static int dev_acquisition_start_##X(const struct sr_dev_inst *sdi \
 
 /* Driver structs and API function wrappers */
 #define DRV(ID, ID_UPPER, NAME, LONGNAME) \
-HW_INIT(ID_UPPER) \
 HW_SCAN(ID_UPPER) \
 HW_DEV_ACQUISITION_START(ID_UPPER) \
 SR_PRIV struct sr_dev_driver ID##_driver_info = { \
        .name = NAME, \
        .longname = LONGNAME, \
        .api_version = 1, \
-       .init = init_##ID_UPPER, \
+       .init = std_init, \
        .cleanup = std_cleanup, \
        .scan = scan_##ID_UPPER, \
        .dev_list = std_dev_list, \
index 322ac3b0b37b5dcb78c6b9b013af7b6af9959baa..c66783f67ba135153b6bf43b068edc332e76a53f 100644 (file)
@@ -64,11 +64,6 @@ static int dev_clear(const struct sr_dev_driver *di)
        return std_dev_clear(di, clear_helper);
 }
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static int add_device(int model, struct libusb_device_descriptor *des,
        const char *serial_num, const char *connection_id,
        libusb_device *usbdev, GSList **devices)
@@ -577,7 +572,7 @@ SR_PRIV struct sr_dev_driver chronovu_la_driver_info = {
        .name = "chronovu-la",
        .longname = "ChronoVu LA8/LA16",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 56b3ead78578abd6fc76ec9be76c89994beaad55..33f27614a7e26add75977b78015d622a449fbda7 100644 (file)
@@ -44,11 +44,6 @@ static const uint32_t devopts[] = {
 
 SR_PRIV struct sr_dev_driver colead_slm_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -166,7 +161,7 @@ SR_PRIV struct sr_dev_driver colead_slm_driver_info = {
        .name = "colead-slm",
        .longname = "Colead SLM",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 16c4157ac1de5eaecebfe3c274c03bb42258c06b..5328ccd16f8545d51c225c43a53000290f8131fa 100644 (file)
@@ -41,11 +41,6 @@ static const uint32_t devopts[] = {
 
 SR_PRIV struct sr_dev_driver conrad_digi_35_cpu_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
@@ -192,7 +187,7 @@ SR_PRIV struct sr_dev_driver conrad_digi_35_cpu_driver_info = {
        .name = "conrad-digi-35-cpu",
        .longname = "Conrad DIGI 35 CPU",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 3df4eccbefc7fef1b88eaebfa6eead9a544425fb..a84ee18b65756a24a9f03546491e85552624ebb7 100644 (file)
@@ -179,11 +179,6 @@ SR_PRIV struct sr_dev_driver demo_driver_info;
 
 static int dev_acquisition_stop(struct sr_dev_inst *sdi);
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate)
 {
        double t, frequency;
@@ -883,7 +878,7 @@ SR_PRIV struct sr_dev_driver demo_driver_info = {
        .name = "demo",
        .longname = "Demo driver and pattern generator",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 3f2a54a1b9a7aba7d2af65d142e567948f2ca247..7fca5c6008b29c74aa14d4091e7a97948ffaefd9 100644 (file)
@@ -39,11 +39,6 @@ static void std_dev_attach(struct sr_dev_driver *di, struct sr_dev_inst *sdi)
 
 SR_PRIV struct sr_dev_driver deree_de5000_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static int dev_clear(const struct sr_dev_driver *di)
 {
        return std_dev_clear(di, es51919_serial_clean);
@@ -65,7 +60,7 @@ SR_PRIV struct sr_dev_driver deree_de5000_driver_info = {
        .name = "deree-de5000",
        .longname = "DER EE DE-5000",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index cd34c181b91ae6e6f30c36a61584a94649d54d0f..0b2f7ffb0363efdf58dcebeeebb816d08b3ec62b 100644 (file)
@@ -59,11 +59,6 @@ static const struct flukedmm_profile supported_flukedmm[] = {
        { FLUKE_289, "289", 100, 1000 },
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *fluke_scan(struct sr_dev_driver *di, const char *conn,
                const char *serialcomm)
 {
@@ -278,7 +273,7 @@ SR_PRIV struct sr_dev_driver flukedmm_driver_info = {
        .name = "fluke-dmm",
        .longname = "Fluke 18x/28x series DMMs",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 2a64729e25722fb7910c4d8ad3f0d34243ba4ec7..4d39cd8fac55e6325860dea201f751602d144534 100644 (file)
@@ -84,11 +84,6 @@ static const struct ftdi_chip_desc *chip_descs[] = {
        &ft232r_desc,
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static void scan_device(struct sr_dev_driver *di, struct libusb_device *dev, GSList **devices)
 {
        struct libusb_device_descriptor usb_desc;
@@ -491,7 +486,7 @@ SR_PRIV struct sr_dev_driver ftdi_la_driver_info = {
        .name = "ftdi-la",
        .longname = "FTDI LA",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 6f6c53fb09c215b68e3f7370aa7c99d47c25e145..dfe6bed65002722e8f51afa8c4211a8672b7a215 100644 (file)
@@ -181,11 +181,6 @@ static const uint64_t dslogic_samplerates[] = {
 
 SR_PRIV struct sr_dev_driver fx2lafw_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -891,7 +886,7 @@ SR_PRIV struct sr_dev_driver fx2lafw_driver_info = {
        .name = "fx2lafw",
        .longname = "fx2lafw (generic driver for FX2 based LAs)",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index de3e9ea527d33de921d386dbb0bfadca1bb4a44e..3abbd16cbf0e3646d17a8e8827fa814151c82d18 100644 (file)
@@ -66,11 +66,6 @@ static const uint32_t devopts_bd[] = {
  * Need to implement device-specific lists.
  */
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 /**
  * Read single byte from serial port.
  *
@@ -518,7 +513,7 @@ SR_PRIV struct sr_dev_driver gmc_mh_1x_2x_rs232_driver_info = {
        .name = "gmc-mh-1x-2x-rs232",
        .longname = "Gossen Metrawatt Metrahit 1x/2x, RS232 interface",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan_1x_2x_rs232,
        .dev_list = std_dev_list,
@@ -537,7 +532,7 @@ SR_PRIV struct sr_dev_driver gmc_mh_2x_bd232_driver_info = {
        .name = "gmc-mh-2x-bd232",
        .longname = "Gossen Metrawatt Metrahit 2x, BD232/SI232-II interface",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan_2x_bd232,
        .dev_list = std_dev_list,
index bd9461e823b3bce670bef3067791afa687bb47d9..57ca4fad571101b4223931922be7173a469e1bc1 100644 (file)
@@ -33,11 +33,6 @@ static const uint32_t devopts[] = {
 
 SR_PRIV struct sr_dev_driver gwinstek_gds_800_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
 {
        struct dev_context *devc;
@@ -244,7 +239,7 @@ SR_PRIV struct sr_dev_driver gwinstek_gds_800_driver_info = {
        .name = "gwinstek-gds-800",
        .longname = "GW Instek GDS-800 series",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 1e60a34aba99696470967da10af091a49f85e9fe..b89de8d8a096a393b07cf15f8c4bbd8f3b23435c 100644 (file)
@@ -47,11 +47,6 @@ enum {
        CG_DIGITAL,
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static int check_manufacturer(const char *manufacturer)
 {
        unsigned int i;
@@ -777,7 +772,7 @@ SR_PRIV struct sr_dev_driver hameg_hmo_driver_info = {
        .name = "hameg-hmo",
        .longname = "Hameg HMO",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 838805dbfda7e9c08cf466ebe0b2c938896059f3..1bc0dbff776e4b129084d4e3c665d80a975dc4c8 100644 (file)
@@ -163,11 +163,6 @@ static int dev_clear(const struct sr_dev_driver *di)
        return std_dev_clear(di, clear_dev_context);
 }
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -813,7 +808,7 @@ SR_PRIV struct sr_dev_driver hantek_6xxx_driver_info = {
        .name = "hantek-6xxx",
        .longname = "Hantek 6xxx",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index c571573356fc2ebdbc72c56c93390acb4f8fee04..7faaa16613dc583780d60ab46a654402568e05e0 100644 (file)
@@ -254,11 +254,6 @@ static int dev_clear(const struct sr_dev_driver *di)
        return std_dev_clear(di, clear_dev_context);
 }
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -1004,7 +999,7 @@ SR_PRIV struct sr_dev_driver hantek_dso_driver_info = {
        .name = "hantek-dso",
        .longname = "Hantek DSO",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 2d05f29a89375a8fd3fa99b27afa2b9404c04438..f9ea375932d43237429ad6f6c364b386e9446cae 100644 (file)
@@ -166,11 +166,6 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
        return sdi;
 }
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        return sr_scpi_scan(di->context, options, probe_device);
@@ -446,7 +441,7 @@ SR_PRIV struct sr_dev_driver hp_3457a_driver_info = {
        .name = "hp-3457a",
        .longname = "HP 3457A",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index e628c771d72ba64a2616404e043d3ad0a73e82f6..6f0910fe867122aad653ead933244322d0b31f36 100644 (file)
@@ -104,11 +104,6 @@ static const uint8_t coupling_map[] = {
        0x00, 0x08, 0x04
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan_port(GSList *devices, struct sr_dev_driver *di,
                         struct parport *port)
 {
@@ -723,7 +718,7 @@ SR_PRIV struct sr_dev_driver hung_chang_dso_2100_driver_info = {
        .name = "hung-chang-dso-2100",
        .longname = "Hung-Chang DSO-2100",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 7f03a59a7d9c63ebf848ea702c9d7515fe81fdeb..a36acf071ada07e975f0efa643b76baadb368092 100644 (file)
@@ -54,11 +54,6 @@ static const char *channel_names[] = {
 
 SR_PRIV struct sr_dev_driver ikalogic_scanalogic2_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        GSList *usb_devices, *devices, *l;
@@ -467,7 +462,7 @@ SR_PRIV struct sr_dev_driver ikalogic_scanalogic2_driver_info = {
        .name = "ikalogic-scanalogic2",
        .longname = "IKALOGIC Scanalogic-2",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index e5b6cec8c0345f0a710bbc7efd2c8909d6b30c79..3111f53eb713ffc04008effa0a73cd01d5dabaab 100644 (file)
@@ -65,11 +65,6 @@ static int dev_clear(const struct sr_dev_driver *di)
        return std_dev_clear(di, clear_helper);
 }
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
@@ -387,7 +382,7 @@ SR_PRIV struct sr_dev_driver ikalogic_scanaplus_driver_info = {
        .name = "ikalogic-scanaplus",
        .longname = "IKALOGIC ScanaPLUS",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 6a64b8f8e20bb622fb45c75c66ab90cc5ea6daea..b3fc1321fb70d6479245830a95edc47b1f06c4d3 100644 (file)
@@ -63,11 +63,6 @@ static const char *data_sources[] = {
 
 SR_PRIV struct sr_dev_driver kecheng_kc_330b_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static int scan_kecheng(struct sr_dev_driver *di,
                struct sr_usb_dev_inst *usb, char **model)
 {
@@ -512,7 +507,7 @@ SR_PRIV struct sr_dev_driver kecheng_kc_330b_driver_info = {
        .name = "kecheng-kc-330b",
        .longname = "Kecheng KC-330B",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index ed55687f299ac14c79012c4a86277b7a42bc63ef..432f3daa6a3c9db4ac3128df7198f8dc91d73152 100644 (file)
@@ -36,11 +36,6 @@ static const uint32_t devopts[] = {
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct scale_info *scale;
@@ -197,7 +192,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
                        .name = ID, \
                        .longname = VENDOR " " MODEL, \
                        .api_version = 1, \
-                       .init = init, \
+                       .init = std_init, \
                        .cleanup = std_cleanup, \
                        .scan = scan, \
                        .dev_list = std_dev_list, \
index 6f4ad65a04491ac4f35836f2f4915d9fb8f0447f..19daff8be5af4e3b7669fe4a4480f9776f4b198b 100644 (file)
@@ -64,11 +64,6 @@ static const struct korad_kaxxxxp_model models[] = {
 
 SR_PRIV struct sr_dev_driver korad_kaxxxxp_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -390,7 +385,7 @@ SR_PRIV struct sr_dev_driver korad_kaxxxxp_driver_info = {
        .name = "korad-kaxxxxp",
        .longname = "Korad KAxxxxP",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 78eab70500f84b2177e07d49e2ec0f959a4abc1d..960a97ea425983e668e75051fa6d288bb0ca680e 100644 (file)
@@ -38,11 +38,6 @@ static const uint32_t devopts[] = {
        SR_CONF_DATALOG | SR_CONF_GET | SR_CONF_SET,
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -420,7 +415,7 @@ SR_PRIV struct sr_dev_driver lascar_el_usb_driver_info = {
        .name = "lascar-el-usb",
        .longname = "Lascar EL-USB",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 303309b757f9099833809e952d7798472bf5ada0..fd73a700e50c6b85e4a7ad099b87f24b4f93b0c2 100644 (file)
@@ -73,11 +73,6 @@ static const uint64_t samplerates[] = {
 
 SR_PRIV struct sr_dev_driver lecroy_logicstudio_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 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)
@@ -509,7 +504,7 @@ SR_PRIV struct sr_dev_driver lecroy_logicstudio_driver_info = {
        .name = "lecroy-logicstudio",
        .longname = "LeCroy LogicStudio",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index ff511730cc0db9e0215aacfdbb7e0f1cc69b3cbe..137deae66477ee35007b57fa831f30d170a32475 100644 (file)
@@ -85,11 +85,6 @@ static int dev_clear(const struct sr_dev_driver *di)
        return ret;
 }
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        int i;
@@ -456,7 +451,7 @@ SR_PRIV struct sr_dev_driver link_mso19_driver_info = {
        .name = "link-mso19",
        .longname = "Link Instruments MSO-19",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 30180d3b15bae25d8ec14eba65e70a0fdd58f50c..4a253a18ebfc40587efce9b661d2645a73bcb35f 100644 (file)
@@ -75,11 +75,6 @@ static const struct hcs_model models[] = {
 
 SR_PRIV struct sr_dev_driver manson_hcs_3xxx_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        int i, model_id;
@@ -396,7 +391,7 @@ SR_PRIV struct sr_dev_driver manson_hcs_3xxx_driver_info = {
        .name = "manson-hcs-3xxx",
        .longname = "Manson HCS-3xxx",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index f8d615d18f92671ff4b186d8c7b86b0d1ecf9ead..c2b77b800ec9667ab7ba4633e0139a26a4645308 100644 (file)
@@ -111,11 +111,6 @@ static const struct maynuo_m97_model supported_models[] = {
 
 SR_PRIV struct sr_dev_driver maynuo_m97_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static struct sr_dev_inst *probe_device(struct sr_modbus_dev_inst *modbus)
 {
        const struct maynuo_m97_model *model = NULL;
@@ -474,7 +469,7 @@ SR_PRIV struct sr_dev_driver maynuo_m97_driver_info = {
        .name = "maynuo-m97",
        .longname = "maynuo M97/M98 series",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 70914e1cd2c94379d3befe7762c72293701242a0..0e957febe3427019ada3d056f965fbc08316cad6 100644 (file)
@@ -57,11 +57,6 @@ SR_PRIV const struct mic_dev_info mic_devs[] = {
        },
 };
 
-static int init(struct sr_context *sr_ctx, int idx)
-{
-       return std_init(mic_devs[idx].di, sr_ctx);
-}
-
 static GSList *mic_scan(const char *conn, const char *serialcomm, int idx)
 {
        struct sr_dev_inst *sdi;
@@ -215,9 +210,6 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
 }
 
 /* Driver-specific API function wrappers */
-#define HW_INIT(X) \
-static int init_##X(struct sr_dev_driver *di, struct sr_context *sr_ctx) { \
-       (void)di; return init(sr_ctx, X); }
 #define HW_SCAN(X) \
 static GSList *scan_##X(struct sr_dev_driver *di, GSList *options) { \
        (void)di; return scan(options, X); }
@@ -231,7 +223,6 @@ static int dev_acquisition_start_##X(const struct sr_dev_inst *sdi \
 
 /* Driver structs and API function wrappers */
 #define DRV(ID, ID_UPPER, NAME, LONGNAME) \
-HW_INIT(ID_UPPER) \
 HW_SCAN(ID_UPPER) \
 HW_CONFIG_LIST(ID_UPPER) \
 HW_DEV_ACQUISITION_START(ID_UPPER) \
@@ -239,7 +230,7 @@ SR_PRIV struct sr_dev_driver ID##_driver_info = { \
        .name = NAME, \
        .longname = LONGNAME, \
        .api_version = 1, \
-       .init = init_##ID_UPPER, \
+       .init = std_init, \
        .cleanup = std_cleanup, \
        .scan = scan_##ID_UPPER, \
        .dev_list = std_dev_list, \
index d8aceb50fa9d21cbfc9225949d11c49ab9d44553..57bc1d2654e9f9a966c85e7c9e7bf078970b41c8 100644 (file)
@@ -133,11 +133,6 @@ static const struct lps_modelspec models[] = {
        },
 };
 
-static int init_lps301(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 /** Send command to device with va_list.
  */
 SR_PRIV int lps_send_va(struct sr_serial_dev_inst *serial, const char *fmt, va_list args)
@@ -810,7 +805,7 @@ SR_PRIV struct sr_dev_driver motech_lps_301_driver_info = {
        .name = "motech-lps-301",
        .longname = "Motech LPS-301",
        .api_version = 1,
-       .init = init_lps301,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan_lps301,
        .dev_list = std_dev_list,
index ad099c9370cb2550021105a7cfecb3a23d8b44c0..8ca269c579310cea30da894359f3daeffbc40872 100644 (file)
@@ -65,11 +65,6 @@ static const char *get_typestr(int type, struct sr_dev_driver *drv)
        return nameref[type - 1][(drv == &siemens_b102x_driver_info)];
 }
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *drv, GSList *options)
 {
        struct sr_dev_inst *sdi;
@@ -258,7 +253,7 @@ SR_PRIV struct sr_dev_driver norma_dmm_driver_info = {
        .name = "norma-dmm",
        .longname = "Norma DM9x0 DMMs",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
@@ -277,7 +272,7 @@ SR_PRIV struct sr_dev_driver siemens_b102x_driver_info = {
        .name = "siemens-b102x",
        .longname = "Siemens B102x DMMs",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index bee4c3a82df19eef94a65b3d831e20f0cd0fb022..a70e3168bd8a3cea86b408924ff3b7dc5c2bacdc 100644 (file)
@@ -87,11 +87,6 @@ static const uint64_t samplerates[] = {
 
 SR_PRIV struct sr_dev_driver ols_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_config *src;
@@ -581,7 +576,7 @@ SR_PRIV struct sr_dev_driver ols_driver_info = {
        .name = "ols",
        .longname = "Openbench Logic Sniffer",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 6a51986f1ae139dd30b87da373af81e1577bffd2..b9da2f98ab55891d5f31c74b747261dcde595dc4 100644 (file)
@@ -77,11 +77,6 @@ static const uint64_t samplerates[] = {
 
 SR_PRIV struct sr_dev_driver p_ols_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
@@ -711,7 +706,7 @@ SR_PRIV struct sr_dev_driver p_ols_driver_info = {
        .name = "p-ols",
        .longname = "Pipistrello OLS",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index ce8fa116734318e1d22b9285117b0df29076304a..7f45e1874173601129d4eeb1ae3a0b5edc1fb82e 100644 (file)
@@ -272,11 +272,6 @@ static int dev_clear(const struct sr_dev_driver *di)
        return std_dev_clear(di, clear_helper);
 }
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
 {
        struct dev_context *devc;
@@ -1061,7 +1056,7 @@ SR_PRIV struct sr_dev_driver rigol_ds_driver_info = {
        .name = "rigol-ds",
        .longname = "Rigol DS",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 5ca534b1ff4b28c77b16aef6b72e3245ec9ad697..98bf26bd04c6d90760d2153f7db93d16a9f62d21 100644 (file)
@@ -95,11 +95,6 @@ static const uint64_t samplerates[] = {
        SR_MHZ(100),
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static gboolean check_conf_profile(libusb_device *dev)
 {
        struct libusb_device_descriptor des;
@@ -796,7 +791,7 @@ SR_PRIV struct sr_dev_driver saleae_logic16_driver_info = {
        .name = "saleae-logic16",
        .longname = "Saleae Logic16",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index c8904b674e30c69d06f1c45ebb5647292cce4f73..785deabb798525a06a3ff2b275900ac297cd2913 100644 (file)
@@ -41,11 +41,6 @@ static const struct pps_channel_instance pci[] = {
        { SR_MQ_FREQUENCY, SCPI_CMD_GET_MEAS_FREQUENCY, "F" },
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
 {
        struct dev_context *devc;
@@ -631,7 +626,7 @@ SR_PRIV struct sr_dev_driver scpi_pps_driver_info = {
        .name = "scpi-pps",
        .longname = "SCPI PPS",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 860062ad510f34297d9299b4458a8c10b3cf3603..9007789cdc5ee1558aca150607de38a3570392d8 100644 (file)
@@ -41,11 +41,6 @@ static const uint32_t devopts[] = {
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct dmm_info *dmm;
@@ -220,7 +215,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
                        .name = ID, \
                        .longname = VENDOR " " MODEL, \
                        .api_version = 1, \
-                       .init = init, \
+                       .init = std_init, \
                        .cleanup = std_cleanup, \
                        .scan = scan, \
                        .dev_list = std_dev_list, \
index a2e29933c0c61f0fb1559b7093da05a422b11424..99c73282bc8dfd16c544c9608274a5fdbfc8bf55 100644 (file)
@@ -61,13 +61,6 @@ static const char *const signal_edge_names[] = {
        [EDGE_NEGATIVE] = "f",
 };
 
-/* Initialize the SysClk LWLA driver.
- */
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 /* Create a new sigrok device instance for the indicated LWLA model.
  */
 static struct sr_dev_inst *dev_inst_new(const struct model_info *model)
@@ -785,7 +778,7 @@ SR_PRIV struct sr_dev_driver sysclk_lwla_driver_info = {
        .name = "sysclk-lwla",
        .longname = "SysClk LWLA series",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index d9445e17b7f5a016d8a2d7fbfbb3ac93c5c852e9..9e64caaed231586ac831b6b1a9223a832a149407 100644 (file)
@@ -38,11 +38,6 @@ static const uint32_t devopts[] = {
 
 SR_PRIV struct sr_dev_driver teleinfo_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -204,7 +199,7 @@ SR_PRIV struct sr_dev_driver teleinfo_driver_info = {
        .name = "teleinfo",
        .longname = "Teleinfo",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index daf4965c37e1ff062a01cd963befb756b65842b8..2ae985dbc00885decb2c0dab8d7a7a11af6b43aa 100644 (file)
@@ -43,11 +43,6 @@ static const struct testo_model models[] = {
        { "435", 9, TESTO_x35_REQUEST },
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -433,7 +428,7 @@ SR_PRIV struct sr_dev_driver testo_driver_info = {
        .name = "testo",
        .longname = "Testo",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 9b31e1d6e0ce729c986ff7f383f7472bd6ae161f..8628ea3023485e48cfa2dd9b8c8fb305f9dfbf0e 100644 (file)
@@ -41,11 +41,6 @@ static const uint32_t devopts[] = {
 
 SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -175,7 +170,7 @@ SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info = {
        .name = "tondaj-sl-814",
        .longname = "Tondaj SL-814",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 6e8663e501e7f6bba03b03fa65baecc13ac76388..8f1d83cdcee5c68a27ce1d5a3198766f69cbc2c5 100644 (file)
@@ -46,11 +46,6 @@ static const uint32_t devopts[] = {
  * default of 2400 being used (which will not work with this DMM, of course).
  */
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        GSList *usb_devices, *devices, *l;
@@ -195,7 +190,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
                        .name = ID, \
                        .longname = VENDOR " " MODEL, \
                        .api_version = 1, \
-                       .init = init, \
+                       .init = std_init, \
                        .cleanup = std_cleanup, \
                        .scan = scan, \
                        .dev_list = std_dev_list, \
index 67a15518797705afc8ce11918349049f09cb6c84..b6385705937c685c3cc5bcc763c7747e2d30dbb0 100644 (file)
@@ -39,11 +39,6 @@ static const char *data_sources[] = {
 
 SR_PRIV struct sr_dev_driver uni_t_ut32x_driver_info;
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -311,7 +306,7 @@ SR_PRIV struct sr_dev_driver uni_t_ut32x_driver_info = {
        .name = "uni-t-ut32x",
        .longname = "UNI-T UT32x",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 35571549eaafc4c9121fee945b7bd8d0af05d3d5..9a07cc8309a97b10477a52d39612894a7d150130 100644 (file)
@@ -50,11 +50,6 @@ static const uint32_t devopts[] = {
        SR_CONF_CONN | SR_CONF_GET,
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct drv_context *drvc;
@@ -346,7 +341,7 @@ SR_PRIV struct sr_dev_driver victor_dmm_driver_info = {
        .name = "victor-dmm",
        .longname = "Victor DMMs",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index 91eea3e0ab46e7b47298f8681403cc0e92bc0062..0a02f5d129ad6289bbc19ccc49cfbd9754d36a3e 100644 (file)
@@ -63,11 +63,6 @@ enum {
        CG_DIGITAL,
 };
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static struct sr_dev_inst *probe_usbtmc_device(struct sr_scpi_dev_inst *scpi)
 {
        struct sr_dev_inst *sdi;
@@ -683,7 +678,7 @@ SR_PRIV struct sr_dev_driver yokogawa_dlm_driver_info = {
        .name = "yokogawa-dlm",
        .longname = "Yokogawa DL/DLM",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index a50ea3f2cae298562abee4c0abc76f01ba5f4006..2207e3da19e6f5a9ed94e7ec0ecd64a8c1df4922 100644 (file)
@@ -155,11 +155,6 @@ SR_PRIV int zp_set_samplerate(struct dev_context *devc, uint64_t samplerate)
        return SR_OK;
 }
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
        struct sr_dev_inst *sdi;
@@ -669,7 +664,7 @@ SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info = {
        .name = "zeroplus-logic-cube",
        .longname = "ZEROPLUS Logic Cube LAP-C series",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
index e0dd3fcb8dc672ca3a87df1cacdd735429185c0e..c275122367778d24b17efb3a1be9d9f30f95262b 100644 (file)
@@ -206,11 +206,6 @@ static int receive_data(int fd, int revents, void *cb_data)
 
 /* driver callbacks */
 
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
-       return std_init(di, sr_ctx);
-}
-
 static int dev_clear(const struct sr_dev_driver *di)
 {
        struct drv_context *drvc;
@@ -389,7 +384,7 @@ SR_PRIV struct sr_dev_driver session_driver = {
        .name = "virtual-session",
        .longname = "Session-emulating driver",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = dev_clear,
        .scan = NULL,
        .dev_list = NULL,