From: Lars-Peter Clausen Date: Sun, 8 May 2016 13:23:13 +0000 (+0200) Subject: Remove unnecessary std_init() wrapper functions X-Git-Tag: libsigrok-0.5.0~422 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c2fdcc25a47c4c8f25e3ea96ea36a674a151e839;p=libsigrok.git Remove unnecessary std_init() wrapper functions 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 --- diff --git a/src/hardware/agilent-dmm/api.c b/src/hardware/agilent-dmm/api.c index b7e4a6bd..7bafabc2 100644 --- a/src/hardware/agilent-dmm/api.c +++ b/src/hardware/agilent-dmm/api.c @@ -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, diff --git a/src/hardware/appa-55ii/api.c b/src/hardware/appa-55ii/api.c index 14b8ea91..0574a487 100644 --- a/src/hardware/appa-55ii/api.c +++ b/src/hardware/appa-55ii/api.c @@ -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, diff --git a/src/hardware/arachnid-labs-re-load-pro/api.c b/src/hardware/arachnid-labs-re-load-pro/api.c index 4bbbf243..203515c0 100644 --- a/src/hardware/arachnid-labs-re-load-pro/api.c +++ b/src/hardware/arachnid-labs-re-load-pro/api.c @@ -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, diff --git a/src/hardware/asix-sigma/api.c b/src/hardware/asix-sigma/api.c index cb61b92b..c9aceaec 100644 --- a/src/hardware/asix-sigma/api.c +++ b/src/hardware/asix-sigma/api.c @@ -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, diff --git a/src/hardware/atten-pps3xxx/api.c b/src/hardware/atten-pps3xxx/api.c index fea793a1..82a1cdaa 100644 --- a/src/hardware/atten-pps3xxx/api.c +++ b/src/hardware/atten-pps3xxx/api.c @@ -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, diff --git a/src/hardware/baylibre-acme/api.c b/src/hardware/baylibre-acme/api.c index 9103aeb1..cfc8e6c8 100644 --- a/src/hardware/baylibre-acme/api.c +++ b/src/hardware/baylibre-acme/api.c @@ -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, diff --git a/src/hardware/beaglelogic/api.c b/src/hardware/beaglelogic/api.c index e28350c1..37468ac3 100644 --- a/src/hardware/beaglelogic/api.c +++ b/src/hardware/beaglelogic/api.c @@ -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, diff --git a/src/hardware/brymen-bm86x/api.c b/src/hardware/brymen-bm86x/api.c index 88a9a5aa..345532e7 100644 --- a/src/hardware/brymen-bm86x/api.c +++ b/src/hardware/brymen-bm86x/api.c @@ -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, diff --git a/src/hardware/brymen-dmm/api.c b/src/hardware/brymen-dmm/api.c index 9aad6504..e9e534df 100644 --- a/src/hardware/brymen-dmm/api.c +++ b/src/hardware/brymen-dmm/api.c @@ -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, diff --git a/src/hardware/cem-dt-885x/api.c b/src/hardware/cem-dt-885x/api.c index c7816ba6..f9ecc7cc 100644 --- a/src/hardware/cem-dt-885x/api.c +++ b/src/hardware/cem-dt-885x/api.c @@ -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, diff --git a/src/hardware/center-3xx/api.c b/src/hardware/center-3xx/api.c index c78825ab..40e8dbd6 100644 --- a/src/hardware/center-3xx/api.c +++ b/src/hardware/center-3xx/api.c @@ -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, \ diff --git a/src/hardware/chronovu-la/api.c b/src/hardware/chronovu-la/api.c index 322ac3b0..c66783f6 100644 --- a/src/hardware/chronovu-la/api.c +++ b/src/hardware/chronovu-la/api.c @@ -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, diff --git a/src/hardware/colead-slm/api.c b/src/hardware/colead-slm/api.c index 56b3ead7..33f27614 100644 --- a/src/hardware/colead-slm/api.c +++ b/src/hardware/colead-slm/api.c @@ -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, diff --git a/src/hardware/conrad-digi-35-cpu/api.c b/src/hardware/conrad-digi-35-cpu/api.c index 16c4157a..5328ccd1 100644 --- a/src/hardware/conrad-digi-35-cpu/api.c +++ b/src/hardware/conrad-digi-35-cpu/api.c @@ -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, diff --git a/src/hardware/demo/demo.c b/src/hardware/demo/demo.c index 3df4eccb..a84ee18b 100644 --- a/src/hardware/demo/demo.c +++ b/src/hardware/demo/demo.c @@ -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, diff --git a/src/hardware/deree-de5000/api.c b/src/hardware/deree-de5000/api.c index 3f2a54a1..7fca5c60 100644 --- a/src/hardware/deree-de5000/api.c +++ b/src/hardware/deree-de5000/api.c @@ -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, diff --git a/src/hardware/fluke-dmm/api.c b/src/hardware/fluke-dmm/api.c index cd34c181..0b2f7ffb 100644 --- a/src/hardware/fluke-dmm/api.c +++ b/src/hardware/fluke-dmm/api.c @@ -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, diff --git a/src/hardware/ftdi-la/api.c b/src/hardware/ftdi-la/api.c index 2a64729e..4d39cd8f 100644 --- a/src/hardware/ftdi-la/api.c +++ b/src/hardware/ftdi-la/api.c @@ -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, diff --git a/src/hardware/fx2lafw/api.c b/src/hardware/fx2lafw/api.c index 6f6c53fb..dfe6bed6 100644 --- a/src/hardware/fx2lafw/api.c +++ b/src/hardware/fx2lafw/api.c @@ -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, diff --git a/src/hardware/gmc-mh-1x-2x/api.c b/src/hardware/gmc-mh-1x-2x/api.c index de3e9ea5..3abbd16c 100644 --- a/src/hardware/gmc-mh-1x-2x/api.c +++ b/src/hardware/gmc-mh-1x-2x/api.c @@ -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, diff --git a/src/hardware/gwinstek-gds-800/api.c b/src/hardware/gwinstek-gds-800/api.c index bd9461e8..57ca4fad 100644 --- a/src/hardware/gwinstek-gds-800/api.c +++ b/src/hardware/gwinstek-gds-800/api.c @@ -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, diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index 1e60a34a..b89de8d8 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -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, diff --git a/src/hardware/hantek-6xxx/api.c b/src/hardware/hantek-6xxx/api.c index 838805db..1bc0dbff 100644 --- a/src/hardware/hantek-6xxx/api.c +++ b/src/hardware/hantek-6xxx/api.c @@ -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, diff --git a/src/hardware/hantek-dso/api.c b/src/hardware/hantek-dso/api.c index c5715733..7faaa166 100644 --- a/src/hardware/hantek-dso/api.c +++ b/src/hardware/hantek-dso/api.c @@ -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, diff --git a/src/hardware/hp-3457a/api.c b/src/hardware/hp-3457a/api.c index 2d05f29a..f9ea3759 100644 --- a/src/hardware/hp-3457a/api.c +++ b/src/hardware/hp-3457a/api.c @@ -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, diff --git a/src/hardware/hung-chang-dso-2100/api.c b/src/hardware/hung-chang-dso-2100/api.c index e628c771..6f0910fe 100644 --- a/src/hardware/hung-chang-dso-2100/api.c +++ b/src/hardware/hung-chang-dso-2100/api.c @@ -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, diff --git a/src/hardware/ikalogic-scanalogic2/api.c b/src/hardware/ikalogic-scanalogic2/api.c index 7f03a59a..a36acf07 100644 --- a/src/hardware/ikalogic-scanalogic2/api.c +++ b/src/hardware/ikalogic-scanalogic2/api.c @@ -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, diff --git a/src/hardware/ikalogic-scanaplus/api.c b/src/hardware/ikalogic-scanaplus/api.c index e5b6cec8..3111f53e 100644 --- a/src/hardware/ikalogic-scanaplus/api.c +++ b/src/hardware/ikalogic-scanaplus/api.c @@ -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, diff --git a/src/hardware/kecheng-kc-330b/api.c b/src/hardware/kecheng-kc-330b/api.c index 6a64b8f8..b3fc1321 100644 --- a/src/hardware/kecheng-kc-330b/api.c +++ b/src/hardware/kecheng-kc-330b/api.c @@ -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, diff --git a/src/hardware/kern-scale/api.c b/src/hardware/kern-scale/api.c index ed55687f..432f3daa 100644 --- a/src/hardware/kern-scale/api.c +++ b/src/hardware/kern-scale/api.c @@ -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, \ diff --git a/src/hardware/korad-kaxxxxp/api.c b/src/hardware/korad-kaxxxxp/api.c index 6f4ad65a..19daff8b 100644 --- a/src/hardware/korad-kaxxxxp/api.c +++ b/src/hardware/korad-kaxxxxp/api.c @@ -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, diff --git a/src/hardware/lascar-el-usb/api.c b/src/hardware/lascar-el-usb/api.c index 78eab705..960a97ea 100644 --- a/src/hardware/lascar-el-usb/api.c +++ b/src/hardware/lascar-el-usb/api.c @@ -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, diff --git a/src/hardware/lecroy-logicstudio/api.c b/src/hardware/lecroy-logicstudio/api.c index 303309b7..fd73a700 100644 --- a/src/hardware/lecroy-logicstudio/api.c +++ b/src/hardware/lecroy-logicstudio/api.c @@ -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, diff --git a/src/hardware/link-mso19/api.c b/src/hardware/link-mso19/api.c index ff511730..137deae6 100644 --- a/src/hardware/link-mso19/api.c +++ b/src/hardware/link-mso19/api.c @@ -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, diff --git a/src/hardware/manson-hcs-3xxx/api.c b/src/hardware/manson-hcs-3xxx/api.c index 30180d3b..4a253a18 100644 --- a/src/hardware/manson-hcs-3xxx/api.c +++ b/src/hardware/manson-hcs-3xxx/api.c @@ -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, diff --git a/src/hardware/maynuo-m97/api.c b/src/hardware/maynuo-m97/api.c index f8d615d1..c2b77b80 100644 --- a/src/hardware/maynuo-m97/api.c +++ b/src/hardware/maynuo-m97/api.c @@ -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, diff --git a/src/hardware/mic-985xx/api.c b/src/hardware/mic-985xx/api.c index 70914e1c..0e957feb 100644 --- a/src/hardware/mic-985xx/api.c +++ b/src/hardware/mic-985xx/api.c @@ -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, \ diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index d8aceb50..57bc1d26 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -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, diff --git a/src/hardware/norma-dmm/api.c b/src/hardware/norma-dmm/api.c index ad099c93..8ca269c5 100644 --- a/src/hardware/norma-dmm/api.c +++ b/src/hardware/norma-dmm/api.c @@ -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, diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c index bee4c3a8..a70e3168 100644 --- a/src/hardware/openbench-logic-sniffer/api.c +++ b/src/hardware/openbench-logic-sniffer/api.c @@ -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, diff --git a/src/hardware/pipistrello-ols/api.c b/src/hardware/pipistrello-ols/api.c index 6a51986f..b9da2f98 100644 --- a/src/hardware/pipistrello-ols/api.c +++ b/src/hardware/pipistrello-ols/api.c @@ -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, diff --git a/src/hardware/rigol-ds/api.c b/src/hardware/rigol-ds/api.c index ce8fa116..7f45e187 100644 --- a/src/hardware/rigol-ds/api.c +++ b/src/hardware/rigol-ds/api.c @@ -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, diff --git a/src/hardware/saleae-logic16/api.c b/src/hardware/saleae-logic16/api.c index 5ca534b1..98bf26bd 100644 --- a/src/hardware/saleae-logic16/api.c +++ b/src/hardware/saleae-logic16/api.c @@ -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, diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index c8904b67..785deabb 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -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, diff --git a/src/hardware/serial-dmm/api.c b/src/hardware/serial-dmm/api.c index 860062ad..9007789c 100644 --- a/src/hardware/serial-dmm/api.c +++ b/src/hardware/serial-dmm/api.c @@ -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, \ diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c index a2e29933..99c73282 100644 --- a/src/hardware/sysclk-lwla/api.c +++ b/src/hardware/sysclk-lwla/api.c @@ -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, diff --git a/src/hardware/teleinfo/api.c b/src/hardware/teleinfo/api.c index d9445e17..9e64caae 100644 --- a/src/hardware/teleinfo/api.c +++ b/src/hardware/teleinfo/api.c @@ -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, diff --git a/src/hardware/testo/api.c b/src/hardware/testo/api.c index daf4965c..2ae985db 100644 --- a/src/hardware/testo/api.c +++ b/src/hardware/testo/api.c @@ -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, diff --git a/src/hardware/tondaj-sl-814/api.c b/src/hardware/tondaj-sl-814/api.c index 9b31e1d6..8628ea30 100644 --- a/src/hardware/tondaj-sl-814/api.c +++ b/src/hardware/tondaj-sl-814/api.c @@ -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, diff --git a/src/hardware/uni-t-dmm/api.c b/src/hardware/uni-t-dmm/api.c index 6e8663e5..8f1d83cd 100644 --- a/src/hardware/uni-t-dmm/api.c +++ b/src/hardware/uni-t-dmm/api.c @@ -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, \ diff --git a/src/hardware/uni-t-ut32x/api.c b/src/hardware/uni-t-ut32x/api.c index 67a15518..b6385705 100644 --- a/src/hardware/uni-t-ut32x/api.c +++ b/src/hardware/uni-t-ut32x/api.c @@ -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, diff --git a/src/hardware/victor-dmm/api.c b/src/hardware/victor-dmm/api.c index 35571549..9a07cc83 100644 --- a/src/hardware/victor-dmm/api.c +++ b/src/hardware/victor-dmm/api.c @@ -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, diff --git a/src/hardware/yokogawa-dlm/api.c b/src/hardware/yokogawa-dlm/api.c index 91eea3e0..0a02f5d1 100644 --- a/src/hardware/yokogawa-dlm/api.c +++ b/src/hardware/yokogawa-dlm/api.c @@ -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, diff --git a/src/hardware/zeroplus-logic-cube/api.c b/src/hardware/zeroplus-logic-cube/api.c index a50ea3f2..2207e3da 100644 --- a/src/hardware/zeroplus-logic-cube/api.c +++ b/src/hardware/zeroplus-logic-cube/api.c @@ -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, diff --git a/src/session_driver.c b/src/session_driver.c index e0dd3fcb..c2751223 100644 --- a/src/session_driver.c +++ b/src/session_driver.c @@ -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,