aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2016-05-08 14:55:15 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2016-05-09 15:10:26 +0200
commit1f8f5bc08e0f684156baac513431b40d79ab4ea1 (patch)
tree3d473d99c70efa063e715e328f599d215b7c3123
parent87629577fe803769bc8b4e7a2bc122785cf90c81 (diff)
Match std_init() parameter order to the driver init() callback
The std_init() callback has the order of the first two paramters opposite to the init() callback. This is primarily due to historical development. Since the std_init() function is usually called from a driver's init() callback aligning the order will allow direct register pass through rather than having to swap them around. It also allow to eventually use the std_init() function directly as the init() callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
-rw-r--r--src/hardware/agilent-dmm/api.c2
-rw-r--r--src/hardware/appa-55ii/api.c2
-rw-r--r--src/hardware/arachnid-labs-re-load-pro/api.c2
-rw-r--r--src/hardware/asix-sigma/api.c2
-rw-r--r--src/hardware/atten-pps3xxx/api.c2
-rw-r--r--src/hardware/baylibre-acme/api.c2
-rw-r--r--src/hardware/beaglelogic/api.c2
-rw-r--r--src/hardware/brymen-bm86x/api.c2
-rw-r--r--src/hardware/brymen-dmm/api.c2
-rw-r--r--src/hardware/cem-dt-885x/api.c2
-rw-r--r--src/hardware/center-3xx/api.c2
-rw-r--r--src/hardware/chronovu-la/api.c2
-rw-r--r--src/hardware/colead-slm/api.c2
-rw-r--r--src/hardware/conrad-digi-35-cpu/api.c2
-rw-r--r--src/hardware/demo/demo.c2
-rw-r--r--src/hardware/deree-de5000/api.c2
-rw-r--r--src/hardware/fluke-dmm/api.c2
-rw-r--r--src/hardware/ftdi-la/api.c2
-rw-r--r--src/hardware/fx2lafw/api.c2
-rw-r--r--src/hardware/gmc-mh-1x-2x/api.c2
-rw-r--r--src/hardware/gwinstek-gds-800/api.c2
-rw-r--r--src/hardware/hameg-hmo/api.c2
-rw-r--r--src/hardware/hantek-6xxx/api.c2
-rw-r--r--src/hardware/hantek-dso/api.c2
-rw-r--r--src/hardware/hp-3457a/api.c2
-rw-r--r--src/hardware/hung-chang-dso-2100/api.c2
-rw-r--r--src/hardware/ikalogic-scanalogic2/api.c2
-rw-r--r--src/hardware/ikalogic-scanaplus/api.c2
-rw-r--r--src/hardware/kecheng-kc-330b/api.c2
-rw-r--r--src/hardware/kern-scale/api.c2
-rw-r--r--src/hardware/korad-kaxxxxp/api.c2
-rw-r--r--src/hardware/lascar-el-usb/api.c2
-rw-r--r--src/hardware/lecroy-logicstudio/api.c2
-rw-r--r--src/hardware/link-mso19/api.c2
-rw-r--r--src/hardware/manson-hcs-3xxx/api.c2
-rw-r--r--src/hardware/maynuo-m97/api.c2
-rw-r--r--src/hardware/mic-985xx/api.c2
-rw-r--r--src/hardware/motech-lps-30x/api.c2
-rw-r--r--src/hardware/norma-dmm/api.c2
-rw-r--r--src/hardware/openbench-logic-sniffer/api.c2
-rw-r--r--src/hardware/pipistrello-ols/api.c2
-rw-r--r--src/hardware/rigol-ds/api.c2
-rw-r--r--src/hardware/saleae-logic16/api.c2
-rw-r--r--src/hardware/scpi-pps/api.c2
-rw-r--r--src/hardware/serial-dmm/api.c2
-rw-r--r--src/hardware/sysclk-lwla/api.c2
-rw-r--r--src/hardware/teleinfo/api.c2
-rw-r--r--src/hardware/testo/api.c2
-rw-r--r--src/hardware/tondaj-sl-814/api.c2
-rw-r--r--src/hardware/uni-t-dmm/api.c2
-rw-r--r--src/hardware/uni-t-ut32x/api.c2
-rw-r--r--src/hardware/victor-dmm/api.c2
-rw-r--r--src/hardware/yokogawa-dlm/api.c2
-rw-r--r--src/hardware/zeroplus-logic-cube/api.c2
-rw-r--r--src/libsigrok-internal.h2
-rw-r--r--src/session_driver.c2
-rw-r--r--src/std.c4
57 files changed, 58 insertions, 58 deletions
diff --git a/src/hardware/agilent-dmm/api.c b/src/hardware/agilent-dmm/api.c
index 1e5679b..da6b84c 100644
--- a/src/hardware/agilent-dmm/api.c
+++ b/src/hardware/agilent-dmm/api.c
@@ -74,7 +74,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/appa-55ii/api.c b/src/hardware/appa-55ii/api.c
index 03c1452..6163f2d 100644
--- a/src/hardware/appa-55ii/api.c
+++ b/src/hardware/appa-55ii/api.c
@@ -46,7 +46,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/arachnid-labs-re-load-pro/api.c b/src/hardware/arachnid-labs-re-load-pro/api.c
index e1bf5fc..4543a02 100644
--- a/src/hardware/arachnid-labs-re-load-pro/api.c
+++ b/src/hardware/arachnid-labs-re-load-pro/api.c
@@ -60,7 +60,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/asix-sigma/api.c b/src/hardware/asix-sigma/api.c
index 77e989a..cb5eeca 100644
--- a/src/hardware/asix-sigma/api.c
+++ b/src/hardware/asix-sigma/api.c
@@ -65,7 +65,7 @@ static int dev_clear(const struct sr_dev_driver *di)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/atten-pps3xxx/api.c b/src/hardware/atten-pps3xxx/api.c
index 21968df..e46bff4 100644
--- a/src/hardware/atten-pps3xxx/api.c
+++ b/src/hardware/atten-pps3xxx/api.c
@@ -79,7 +79,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options, int modelid)
diff --git a/src/hardware/baylibre-acme/api.c b/src/hardware/baylibre-acme/api.c
index a556449..49cf96a 100644
--- a/src/hardware/baylibre-acme/api.c
+++ b/src/hardware/baylibre-acme/api.c
@@ -55,7 +55,7 @@ static const uint64_t samplerates[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/beaglelogic/api.c b/src/hardware/beaglelogic/api.c
index 8694d8f..e8309bd 100644
--- a/src/hardware/beaglelogic/api.c
+++ b/src/hardware/beaglelogic/api.c
@@ -62,7 +62,7 @@ static const uint64_t samplerates[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static struct dev_context *beaglelogic_devc_alloc(void)
diff --git a/src/hardware/brymen-bm86x/api.c b/src/hardware/brymen-bm86x/api.c
index 3f270fb..cf41e90 100644
--- a/src/hardware/brymen-bm86x/api.c
+++ b/src/hardware/brymen-bm86x/api.c
@@ -37,7 +37,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/brymen-dmm/api.c b/src/hardware/brymen-dmm/api.c
index ffc0e9c..28e2a5b 100644
--- a/src/hardware/brymen-dmm/api.c
+++ b/src/hardware/brymen-dmm/api.c
@@ -37,7 +37,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *brymen_scan(const char *conn, const char *serialcomm)
diff --git a/src/hardware/cem-dt-885x/api.c b/src/hardware/cem-dt-885x/api.c
index 435c236..40b8c6d 100644
--- a/src/hardware/cem-dt-885x/api.c
+++ b/src/hardware/cem-dt-885x/api.c
@@ -73,7 +73,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/center-3xx/api.c b/src/hardware/center-3xx/api.c
index 27fcad5..6c0e089 100644
--- a/src/hardware/center-3xx/api.c
+++ b/src/hardware/center-3xx/api.c
@@ -58,7 +58,7 @@ SR_PRIV const struct center_dev_info center_devs[] = {
static int init(struct sr_context *sr_ctx, int idx)
{
- return std_init(sr_ctx, center_devs[idx].di, LOG_PREFIX);
+ return std_init(center_devs[idx].di, sr_ctx, LOG_PREFIX);
}
static GSList *center_scan(const char *conn, const char *serialcomm, int idx)
diff --git a/src/hardware/chronovu-la/api.c b/src/hardware/chronovu-la/api.c
index 1e6f5f4..fa28d82 100644
--- a/src/hardware/chronovu-la/api.c
+++ b/src/hardware/chronovu-la/api.c
@@ -66,7 +66,7 @@ static int dev_clear(const struct sr_dev_driver *di)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static int add_device(int model, struct libusb_device_descriptor *des,
diff --git a/src/hardware/colead-slm/api.c b/src/hardware/colead-slm/api.c
index 01da31a..7cbd2e6 100644
--- a/src/hardware/colead-slm/api.c
+++ b/src/hardware/colead-slm/api.c
@@ -46,7 +46,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/conrad-digi-35-cpu/api.c b/src/hardware/conrad-digi-35-cpu/api.c
index 92798e8..357dad9 100644
--- a/src/hardware/conrad-digi-35-cpu/api.c
+++ b/src/hardware/conrad-digi-35-cpu/api.c
@@ -43,7 +43,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/demo/demo.c b/src/hardware/demo/demo.c
index 9a02323..1587d5e 100644
--- a/src/hardware/demo/demo.c
+++ b/src/hardware/demo/demo.c
@@ -181,7 +181,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate)
diff --git a/src/hardware/deree-de5000/api.c b/src/hardware/deree-de5000/api.c
index 2f1109b..7a83202 100644
--- a/src/hardware/deree-de5000/api.c
+++ b/src/hardware/deree-de5000/api.c
@@ -41,7 +41,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static int dev_clear(const struct sr_dev_driver *di)
diff --git a/src/hardware/fluke-dmm/api.c b/src/hardware/fluke-dmm/api.c
index b352355..8d4ed2b 100644
--- a/src/hardware/fluke-dmm/api.c
+++ b/src/hardware/fluke-dmm/api.c
@@ -61,7 +61,7 @@ static const struct flukedmm_profile supported_flukedmm[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *fluke_scan(struct sr_dev_driver *di, const char *conn,
diff --git a/src/hardware/ftdi-la/api.c b/src/hardware/ftdi-la/api.c
index a1b3e96..c258be1 100644
--- a/src/hardware/ftdi-la/api.c
+++ b/src/hardware/ftdi-la/api.c
@@ -86,7 +86,7 @@ static const struct ftdi_chip_desc *chip_descs[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static void scan_device(struct sr_dev_driver *di, struct libusb_device *dev, GSList **devices)
diff --git a/src/hardware/fx2lafw/api.c b/src/hardware/fx2lafw/api.c
index 6eeaed0..e56f152 100644
--- a/src/hardware/fx2lafw/api.c
+++ b/src/hardware/fx2lafw/api.c
@@ -183,7 +183,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/gmc-mh-1x-2x/api.c b/src/hardware/gmc-mh-1x-2x/api.c
index 2f0f671..67ad40d 100644
--- a/src/hardware/gmc-mh-1x-2x/api.c
+++ b/src/hardware/gmc-mh-1x-2x/api.c
@@ -68,7 +68,7 @@ static const uint32_t devopts_bd[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
/**
diff --git a/src/hardware/gwinstek-gds-800/api.c b/src/hardware/gwinstek-gds-800/api.c
index 0da6760..5e4a67f 100644
--- a/src/hardware/gwinstek-gds-800/api.c
+++ b/src/hardware/gwinstek-gds-800/api.c
@@ -35,7 +35,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c
index b810b9f..f75f55e 100644
--- a/src/hardware/hameg-hmo/api.c
+++ b/src/hardware/hameg-hmo/api.c
@@ -49,7 +49,7 @@ enum {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static int check_manufacturer(const char *manufacturer)
diff --git a/src/hardware/hantek-6xxx/api.c b/src/hardware/hantek-6xxx/api.c
index 1d60064..ab866a4 100644
--- a/src/hardware/hantek-6xxx/api.c
+++ b/src/hardware/hantek-6xxx/api.c
@@ -165,7 +165,7 @@ static int dev_clear(const struct sr_dev_driver *di)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/hantek-dso/api.c b/src/hardware/hantek-dso/api.c
index 8a2f42c..6162d5c 100644
--- a/src/hardware/hantek-dso/api.c
+++ b/src/hardware/hantek-dso/api.c
@@ -256,7 +256,7 @@ static int dev_clear(const struct sr_dev_driver *di)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/hp-3457a/api.c b/src/hardware/hp-3457a/api.c
index 5dedc92..a5ff7d9 100644
--- a/src/hardware/hp-3457a/api.c
+++ b/src/hardware/hp-3457a/api.c
@@ -168,7 +168,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/hung-chang-dso-2100/api.c b/src/hardware/hung-chang-dso-2100/api.c
index 791fd5d..eb2246f 100644
--- a/src/hardware/hung-chang-dso-2100/api.c
+++ b/src/hardware/hung-chang-dso-2100/api.c
@@ -106,7 +106,7 @@ static const uint8_t coupling_map[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan_port(GSList *devices, struct sr_dev_driver *di,
diff --git a/src/hardware/ikalogic-scanalogic2/api.c b/src/hardware/ikalogic-scanalogic2/api.c
index 1ce3b91..6a8e095 100644
--- a/src/hardware/ikalogic-scanalogic2/api.c
+++ b/src/hardware/ikalogic-scanalogic2/api.c
@@ -56,7 +56,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/ikalogic-scanaplus/api.c b/src/hardware/ikalogic-scanaplus/api.c
index 8c8ee13..898d7a3 100644
--- a/src/hardware/ikalogic-scanaplus/api.c
+++ b/src/hardware/ikalogic-scanaplus/api.c
@@ -67,7 +67,7 @@ static int dev_clear(const struct sr_dev_driver *di)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/kecheng-kc-330b/api.c b/src/hardware/kecheng-kc-330b/api.c
index 86ac30b..309b1b6 100644
--- a/src/hardware/kecheng-kc-330b/api.c
+++ b/src/hardware/kecheng-kc-330b/api.c
@@ -65,7 +65,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static int scan_kecheng(struct sr_dev_driver *di,
diff --git a/src/hardware/kern-scale/api.c b/src/hardware/kern-scale/api.c
index 0705750..ef95430 100644
--- a/src/hardware/kern-scale/api.c
+++ b/src/hardware/kern-scale/api.c
@@ -38,7 +38,7 @@ static const uint32_t devopts[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/korad-kaxxxxp/api.c b/src/hardware/korad-kaxxxxp/api.c
index 5361908..9a2b916 100644
--- a/src/hardware/korad-kaxxxxp/api.c
+++ b/src/hardware/korad-kaxxxxp/api.c
@@ -66,7 +66,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/lascar-el-usb/api.c b/src/hardware/lascar-el-usb/api.c
index 3b78b19..ce61f46 100644
--- a/src/hardware/lascar-el-usb/api.c
+++ b/src/hardware/lascar-el-usb/api.c
@@ -40,7 +40,7 @@ static const uint32_t devopts[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/lecroy-logicstudio/api.c b/src/hardware/lecroy-logicstudio/api.c
index b6c5116..8e58bd0 100644
--- a/src/hardware/lecroy-logicstudio/api.c
+++ b/src/hardware/lecroy-logicstudio/api.c
@@ -75,7 +75,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static struct sr_dev_inst *create_device(struct sr_dev_driver *di,
diff --git a/src/hardware/link-mso19/api.c b/src/hardware/link-mso19/api.c
index c35fc71..e25c557 100644
--- a/src/hardware/link-mso19/api.c
+++ b/src/hardware/link-mso19/api.c
@@ -87,7 +87,7 @@ static int dev_clear(const struct sr_dev_driver *di)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/manson-hcs-3xxx/api.c b/src/hardware/manson-hcs-3xxx/api.c
index 29a29f9..4ce5909 100644
--- a/src/hardware/manson-hcs-3xxx/api.c
+++ b/src/hardware/manson-hcs-3xxx/api.c
@@ -77,7 +77,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/maynuo-m97/api.c b/src/hardware/maynuo-m97/api.c
index b99f8ee..59f9c7f 100644
--- a/src/hardware/maynuo-m97/api.c
+++ b/src/hardware/maynuo-m97/api.c
@@ -113,7 +113,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static struct sr_dev_inst *probe_device(struct sr_modbus_dev_inst *modbus)
diff --git a/src/hardware/mic-985xx/api.c b/src/hardware/mic-985xx/api.c
index b0b6411..f6d77f0 100644
--- a/src/hardware/mic-985xx/api.c
+++ b/src/hardware/mic-985xx/api.c
@@ -59,7 +59,7 @@ SR_PRIV const struct mic_dev_info mic_devs[] = {
static int init(struct sr_context *sr_ctx, int idx)
{
- return std_init(sr_ctx, mic_devs[idx].di, LOG_PREFIX);
+ return std_init(mic_devs[idx].di, sr_ctx, LOG_PREFIX);
}
static GSList *mic_scan(const char *conn, const char *serialcomm, int idx)
diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c
index 02ee76d..8d87da0 100644
--- a/src/hardware/motech-lps-30x/api.c
+++ b/src/hardware/motech-lps-30x/api.c
@@ -135,7 +135,7 @@ static const struct lps_modelspec models[] = {
static int init_lps301(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
/** Send command to device with va_list.
diff --git a/src/hardware/norma-dmm/api.c b/src/hardware/norma-dmm/api.c
index 91fc5a1..fa32fa6 100644
--- a/src/hardware/norma-dmm/api.c
+++ b/src/hardware/norma-dmm/api.c
@@ -67,7 +67,7 @@ static const char *get_typestr(int type, struct sr_dev_driver *drv)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *drv, GSList *options)
diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c
index 9a96e23..96a7cc0 100644
--- a/src/hardware/openbench-logic-sniffer/api.c
+++ b/src/hardware/openbench-logic-sniffer/api.c
@@ -89,7 +89,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/pipistrello-ols/api.c b/src/hardware/pipistrello-ols/api.c
index a2b01dc..c4d0cf3 100644
--- a/src/hardware/pipistrello-ols/api.c
+++ b/src/hardware/pipistrello-ols/api.c
@@ -79,7 +79,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/rigol-ds/api.c b/src/hardware/rigol-ds/api.c
index f38ad8d..53208a7 100644
--- a/src/hardware/rigol-ds/api.c
+++ b/src/hardware/rigol-ds/api.c
@@ -274,7 +274,7 @@ static int dev_clear(const struct sr_dev_driver *di)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
diff --git a/src/hardware/saleae-logic16/api.c b/src/hardware/saleae-logic16/api.c
index 4990ce8..5c587ef 100644
--- a/src/hardware/saleae-logic16/api.c
+++ b/src/hardware/saleae-logic16/api.c
@@ -97,7 +97,7 @@ static const uint64_t samplerates[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static gboolean check_conf_profile(libusb_device *dev)
diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c
index 5fd83d4..01ae50c 100644
--- a/src/hardware/scpi-pps/api.c
+++ b/src/hardware/scpi-pps/api.c
@@ -43,7 +43,7 @@ static const struct pps_channel_instance pci[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
diff --git a/src/hardware/serial-dmm/api.c b/src/hardware/serial-dmm/api.c
index b66274c..b16caa9 100644
--- a/src/hardware/serial-dmm/api.c
+++ b/src/hardware/serial-dmm/api.c
@@ -43,7 +43,7 @@ static const uint32_t devopts[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c
index 0a614f9..33992ff 100644
--- a/src/hardware/sysclk-lwla/api.c
+++ b/src/hardware/sysclk-lwla/api.c
@@ -65,7 +65,7 @@ static const char *const signal_edge_names[] = {
*/
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
/* Create a new sigrok device instance for the indicated LWLA model.
diff --git a/src/hardware/teleinfo/api.c b/src/hardware/teleinfo/api.c
index be4261c..a99fd37 100644
--- a/src/hardware/teleinfo/api.c
+++ b/src/hardware/teleinfo/api.c
@@ -40,7 +40,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/testo/api.c b/src/hardware/testo/api.c
index a6146e0..79a11b4 100644
--- a/src/hardware/testo/api.c
+++ b/src/hardware/testo/api.c
@@ -45,7 +45,7 @@ static const struct testo_model models[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/tondaj-sl-814/api.c b/src/hardware/tondaj-sl-814/api.c
index 20beb23..7c9c1bf 100644
--- a/src/hardware/tondaj-sl-814/api.c
+++ b/src/hardware/tondaj-sl-814/api.c
@@ -43,7 +43,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/uni-t-dmm/api.c b/src/hardware/uni-t-dmm/api.c
index 2d8cff1..1c1cd30 100644
--- a/src/hardware/uni-t-dmm/api.c
+++ b/src/hardware/uni-t-dmm/api.c
@@ -48,7 +48,7 @@ static const uint32_t devopts[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/uni-t-ut32x/api.c b/src/hardware/uni-t-ut32x/api.c
index 7ed3f88..5e8be27 100644
--- a/src/hardware/uni-t-ut32x/api.c
+++ b/src/hardware/uni-t-ut32x/api.c
@@ -41,7 +41,7 @@ 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(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/victor-dmm/api.c b/src/hardware/victor-dmm/api.c
index 47854ee..c00c29f 100644
--- a/src/hardware/victor-dmm/api.c
+++ b/src/hardware/victor-dmm/api.c
@@ -52,7 +52,7 @@ static const uint32_t devopts[] = {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/hardware/yokogawa-dlm/api.c b/src/hardware/yokogawa-dlm/api.c
index 082c017..547179d 100644
--- a/src/hardware/yokogawa-dlm/api.c
+++ b/src/hardware/yokogawa-dlm/api.c
@@ -65,7 +65,7 @@ enum {
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static struct sr_dev_inst *probe_usbtmc_device(struct sr_scpi_dev_inst *scpi)
diff --git a/src/hardware/zeroplus-logic-cube/api.c b/src/hardware/zeroplus-logic-cube/api.c
index 23a2e69..32c8689 100644
--- a/src/hardware/zeroplus-logic-cube/api.c
+++ b/src/hardware/zeroplus-logic-cube/api.c
@@ -157,7 +157,7 @@ SR_PRIV int zp_set_samplerate(struct dev_context *devc, uint64_t samplerate)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h
index 589d0a4..328e170 100644
--- a/src/libsigrok-internal.h
+++ b/src/libsigrok-internal.h
@@ -859,7 +859,7 @@ SR_PRIV int sr_analog_init(struct sr_datafeed_analog *analog,
typedef int (*dev_close_callback)(struct sr_dev_inst *sdi);
typedef void (*std_dev_clear_callback)(void *priv);
-SR_PRIV int std_init(struct sr_context *sr_ctx, struct sr_dev_driver *di,
+SR_PRIV int std_init(struct sr_dev_driver *di, struct sr_context *sr_ctx,
const char *prefix);
SR_PRIV int std_cleanup(const struct sr_dev_driver *di);
#ifdef HAVE_LIBSERIALPORT
diff --git a/src/session_driver.c b/src/session_driver.c
index d56c22c..c7f2b3d 100644
--- a/src/session_driver.c
+++ b/src/session_driver.c
@@ -208,7 +208,7 @@ static int receive_data(int fd, int revents, void *cb_data)
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static int dev_clear(const struct sr_dev_driver *di)
diff --git a/src/std.c b/src/std.c
index aadf823..8f6f378 100644
--- a/src/std.c
+++ b/src/std.c
@@ -39,13 +39,13 @@
* It creates a new 'struct drv_context' (drvc), assigns sr_ctx to it, and
* then 'drvc' is assigned to the 'struct sr_dev_driver' (di) that is passed.
*
- * @param sr_ctx The libsigrok context to assign.
* @param di The driver instance to use.
+ * @param sr_ctx The libsigrok context to assign.
* @param[in] prefix A driver-specific prefix string used for log messages.
*
* @return SR_OK upon success, SR_ERR_ARG upon invalid arguments.
*/
-SR_PRIV int std_init(struct sr_context *sr_ctx, struct sr_dev_driver *di,
+SR_PRIV int std_init(struct sr_dev_driver *di, struct sr_context *sr_ctx,
const char *prefix)
{
struct drv_context *drvc;