From: Bert Vermeulen Date: Sun, 22 Jul 2012 10:35:57 +0000 (+0200) Subject: ols: change driver dev_acquisition_start/_stop calls to use sdi X-Git-Tag: dsupstream~778 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5d9ed643e9dddbdb43e8917cff197346bdc930e7;p=libsigrok.git ols: change driver dev_acquisition_start/_stop calls to use sdi ...yeah, forgot OLS. --- diff --git a/hardware/openbench-logic-sniffer/ols.c b/hardware/openbench-logic-sniffer/ols.c index 735f5fda..ad5e7f29 100644 --- a/hardware/openbench-logic-sniffer/ols.c +++ b/hardware/openbench-logic-sniffer/ols.c @@ -884,12 +884,12 @@ static int receive_data(int fd, int revents, void *cb_data) return TRUE; } -static int hw_dev_acquisition_start(int dev_index, void *cb_data) +static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, + void *cb_data) { struct sr_datafeed_packet *packet; struct sr_datafeed_header *header; struct sr_datafeed_meta_logic meta; - struct sr_dev_inst *sdi; struct context *ctx; uint32_t trigger_config[4]; uint32_t data; @@ -898,9 +898,6 @@ static int hw_dev_acquisition_start(int dev_index, void *cb_data) int num_channels; int i; - if (!(sdi = sr_dev_inst_get(odi->instances, dev_index))) - return SR_ERR; - ctx = sdi->priv; if (sdi->status != SR_ST_ACTIVE) @@ -1044,12 +1041,13 @@ static int hw_dev_acquisition_start(int dev_index, void *cb_data) } /* TODO: This stops acquisition on ALL devices, ignoring dev_index. */ -static int hw_dev_acquisition_stop(int dev_index, void *cb_data) +static int hw_dev_acquisition_stop(const struct sr_dev_inst *sdi, + void *cb_data) { struct sr_datafeed_packet packet; /* Avoid compiler warnings. */ - (void)dev_index; + (void)sdi; packet.type = SR_DF_END; sr_session_send(cb_data, &packet);