From: Uwe Hermann Date: Wed, 13 Apr 2016 20:11:22 +0000 (+0200) Subject: std_serial_dev_acquisition_stop(): Drop unneeded parameter. X-Git-Tag: libsigrok-0.5.0~480 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6525d819eef098a43b1f438ae4af50e67c9c4335;p=libsigrok.git std_serial_dev_acquisition_stop(): Drop unneeded parameter. --- diff --git a/src/hardware/agilent-dmm/api.c b/src/hardware/agilent-dmm/api.c index 6a34985f..9ff02d9a 100644 --- a/src/hardware/agilent-dmm/api.c +++ b/src/hardware/agilent-dmm/api.c @@ -246,7 +246,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/appa-55ii/api.c b/src/hardware/appa-55ii/api.c index d81d0763..87f5ea49 100644 --- a/src/hardware/appa-55ii/api.c +++ b/src/hardware/appa-55ii/api.c @@ -255,7 +255,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/arachnid-labs-re-load-pro/api.c b/src/hardware/arachnid-labs-re-load-pro/api.c index 4e186051..3686b348 100644 --- a/src/hardware/arachnid-labs-re-load-pro/api.c +++ b/src/hardware/arachnid-labs-re-load-pro/api.c @@ -376,7 +376,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/brymen-dmm/api.c b/src/hardware/brymen-dmm/api.c index ceb7d846..1dcf205c 100644 --- a/src/hardware/brymen-dmm/api.c +++ b/src/hardware/brymen-dmm/api.c @@ -224,7 +224,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/cem-dt-885x/api.c b/src/hardware/cem-dt-885x/api.c index 146c8046..9e863ff7 100644 --- a/src/hardware/cem-dt-885x/api.c +++ b/src/hardware/cem-dt-885x/api.c @@ -406,7 +406,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) if (sdi->status != SR_ST_ACTIVE) return SR_ERR_DEV_CLOSED; - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/center-3xx/api.c b/src/hardware/center-3xx/api.c index bdcb0169..d4451cbe 100644 --- a/src/hardware/center-3xx/api.c +++ b/src/hardware/center-3xx/api.c @@ -228,7 +228,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, int idx) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/colead-slm/api.c b/src/hardware/colead-slm/api.c index c7019a31..7e764bba 100644 --- a/src/hardware/colead-slm/api.c +++ b/src/hardware/colead-slm/api.c @@ -190,7 +190,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/fluke-dmm/api.c b/src/hardware/fluke-dmm/api.c index bc2e0e56..765a26a9 100644 --- a/src/hardware/fluke-dmm/api.c +++ b/src/hardware/fluke-dmm/api.c @@ -280,7 +280,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/gmc-mh-1x-2x/api.c b/src/hardware/gmc-mh-1x-2x/api.c index 2b7bfca6..15bf7f9f 100644 --- a/src/hardware/gmc-mh-1x-2x/api.c +++ b/src/hardware/gmc-mh-1x-2x/api.c @@ -521,7 +521,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) if (sdi && (devc = sdi->priv) && devc->limit_msec) g_timer_stop(devc->elapsed_msec); - return std_serial_dev_acquisition_stop(sdi, sdi, dev_close, + return std_serial_dev_acquisition_stop(sdi, dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/kern-scale/api.c b/src/hardware/kern-scale/api.c index 03a68d8a..6a035158 100644 --- a/src/hardware/kern-scale/api.c +++ b/src/hardware/kern-scale/api.c @@ -213,7 +213,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/korad-kaxxxxp/api.c b/src/hardware/korad-kaxxxxp/api.c index 42dd581a..5aa5b217 100644 --- a/src/hardware/korad-kaxxxxp/api.c +++ b/src/hardware/korad-kaxxxxp/api.c @@ -410,7 +410,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) if (sdi->status != SR_ST_ACTIVE) return SR_ERR_DEV_CLOSED; - return std_serial_dev_acquisition_stop(sdi, sdi, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/link-mso19/protocol.c b/src/hardware/link-mso19/protocol.c index dbc8f79c..8d4f9056 100644 --- a/src/hardware/link-mso19/protocol.c +++ b/src/hardware/link-mso19/protocol.c @@ -422,7 +422,7 @@ SR_PRIV int mso_receive_data(int fd, int revents, void *cb_data) if (devc->limit_samples && devc->num_samples >= devc->limit_samples) { sr_info("Requested number of samples reached."); - sdi->driver->dev_acquisition_stop(sdi, sdi); + sdi->driver->dev_acquisition_stop(sdi); } return TRUE; diff --git a/src/hardware/manson-hcs-3xxx/api.c b/src/hardware/manson-hcs-3xxx/api.c index 125febbe..cc9ab74a 100644 --- a/src/hardware/manson-hcs-3xxx/api.c +++ b/src/hardware/manson-hcs-3xxx/api.c @@ -414,7 +414,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/mic-985xx/api.c b/src/hardware/mic-985xx/api.c index aafb08a9..b8e69465 100644 --- a/src/hardware/mic-985xx/api.c +++ b/src/hardware/mic-985xx/api.c @@ -236,7 +236,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, int idx) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index bbbdb660..cee97b57 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -831,7 +831,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) if (sdi && (devc = sdi->priv) && devc->limit_msec) g_timer_stop(devc->elapsed_msec); - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/norma-dmm/api.c b/src/hardware/norma-dmm/api.c index 04775a64..8a93f790 100644 --- a/src/hardware/norma-dmm/api.c +++ b/src/hardware/norma-dmm/api.c @@ -281,7 +281,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) if (sdi && (devc = sdi->priv) && devc->limit_msec) g_timer_stop(devc->elapsed_msec); - return std_serial_dev_acquisition_stop(sdi, sdi, dev_close, + return std_serial_dev_acquisition_stop(sdi, dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/serial-dmm/api.c b/src/hardware/serial-dmm/api.c index eaf913f2..f5058764 100644 --- a/src/hardware/serial-dmm/api.c +++ b/src/hardware/serial-dmm/api.c @@ -241,7 +241,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/teleinfo/api.c b/src/hardware/teleinfo/api.c index 1d8f91df..7af74b03 100644 --- a/src/hardware/teleinfo/api.c +++ b/src/hardware/teleinfo/api.c @@ -223,7 +223,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/hardware/tondaj-sl-814/api.c b/src/hardware/tondaj-sl-814/api.c index e417d96f..d6d6f1e7 100644 --- a/src/hardware/tondaj-sl-814/api.c +++ b/src/hardware/tondaj-sl-814/api.c @@ -180,7 +180,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/lcr/es51919.c b/src/lcr/es51919.c index ceffa411..f020de83 100644 --- a/src/lcr/es51919.c +++ b/src/lcr/es51919.c @@ -929,6 +929,6 @@ SR_PRIV int es51919_serial_acquisition_start(const struct sr_dev_inst *sdi) SR_PRIV int es51919_serial_acquisition_stop(struct sr_dev_inst *sdi) { - return std_serial_dev_acquisition_stop(sdi, sdi, + return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index 7c8c0eb2..af08f2ab 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -852,7 +852,7 @@ SR_PRIV int std_init(struct sr_context *sr_ctx, struct sr_dev_driver *di, #ifdef HAVE_LIBSERIALPORT SR_PRIV int std_serial_dev_open(struct sr_dev_inst *sdi); SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi, - void *cb_data, dev_close_callback dev_close_fn, + dev_close_callback dev_close_fn, struct sr_serial_dev_inst *serial, const char *prefix); #endif SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi, diff --git a/src/std.c b/src/std.c index adbd2e52..d741c809 100644 --- a/src/std.c +++ b/src/std.c @@ -211,7 +211,7 @@ SR_PRIV int std_serial_dev_close(struct sr_dev_inst *sdi) * @retval SR_ERR Other errors. */ SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi, - void *cb_data, dev_close_callback dev_close_fn, + dev_close_callback dev_close_fn, struct sr_serial_dev_inst *serial, const char *prefix) { int ret; @@ -238,7 +238,7 @@ SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi, return ret; } - std_session_send_df_end(cb_data, prefix); + std_session_send_df_end(sdi, prefix); return SR_OK; }