From: Uwe Hermann Date: Thu, 9 Jul 2015 19:05:44 +0000 (+0200) Subject: Convert a few more occurrences of d->priv to d->context. X-Git-Tag: libsigrok-0.4.0~461 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=338143ea0371133c2b3f56bb2cc5e8726c0141d8;p=libsigrok.git Convert a few more occurrences of d->priv to d->context. --- diff --git a/src/hardware/ikalogic-scanalogic2/protocol.c b/src/hardware/ikalogic-scanalogic2/protocol.c index 70ef2809..90c16ef7 100644 --- a/src/hardware/ikalogic-scanalogic2/protocol.c +++ b/src/hardware/ikalogic-scanalogic2/protocol.c @@ -25,7 +25,7 @@ extern uint64_t sl2_samplerates[NUM_SAMPLERATES]; static void stop_acquisition(struct sr_dev_inst *sdi) { - struct drv_context *drvc = sdi->driver->priv; + struct drv_context *drvc = sdi->driver->context; struct dev_context *devc; struct sr_datafeed_packet packet; @@ -42,7 +42,7 @@ static void stop_acquisition(struct sr_dev_inst *sdi) static void abort_acquisition(struct sr_dev_inst *sdi) { - struct drv_context *drvc = sdi->driver->priv; + struct drv_context *drvc = sdi->driver->context; struct dev_context *devc; struct sr_datafeed_packet packet; diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index 19f530de..b9fee49d 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -389,7 +389,7 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o conn = serialcomm = NULL; devices = NULL; - drvc = drv->priv; + drvc = drv->context; drvc->instances = NULL; sr_spew("scan() called!"); diff --git a/src/hardware/norma-dmm/api.c b/src/hardware/norma-dmm/api.c index c86f9c7d..fca56b36 100644 --- a/src/hardware/norma-dmm/api.c +++ b/src/hardware/norma-dmm/api.c @@ -86,7 +86,7 @@ static GSList *scan(struct sr_dev_driver* drv, GSList *options) int auxtype; devices = NULL; - drvc = drv->priv; + drvc = drv->context; drvc->instances = NULL; conn = serialcomm = NULL; diff --git a/src/hardware/sysclk-lwla/protocol.c b/src/hardware/sysclk-lwla/protocol.c index 894c8efe..f22d80ad 100644 --- a/src/hardware/sysclk-lwla/protocol.c +++ b/src/hardware/sysclk-lwla/protocol.c @@ -582,7 +582,7 @@ static void end_acquisition(struct sr_dev_inst *sdi) struct dev_context *devc; struct sr_datafeed_packet packet; - drvc = sdi->driver->priv; + drvc = sdi->driver->context; devc = sdi->priv; if (devc->state == STATE_IDLE) @@ -1004,7 +1004,7 @@ SR_PRIV int lwla_receive_data(int fd, int revents, void *cb_data) sdi = cb_data; devc = sdi->priv; - drvc = sdi->driver->priv; + drvc = sdi->driver->context; if (!devc || !drvc) return FALSE; diff --git a/tests/lib.c b/tests/lib.c index cb8b8a48..0da9b7ab 100644 --- a/tests/lib.c +++ b/tests/lib.c @@ -97,7 +97,7 @@ void srtest_set_samplerate(struct sr_dev_driver *driver, uint64_t samplerate) struct sr_dev_inst *sdi; GVariant *gvar; - sdi = g_slist_nth_data(driver->priv, 0); + sdi = g_slist_nth_data(driver->context, 0); gvar = g_variant_new_uint64(samplerate); ret = driver->config_set(SR_CONF_SAMPLERATE, gvar, sdi, NULL); @@ -115,7 +115,7 @@ uint64_t srtest_get_samplerate(struct sr_dev_driver *driver) struct sr_dev_inst *sdi; GVariant *gvar; - sdi = g_slist_nth_data(driver->priv, 0); + sdi = g_slist_nth_data(driver->context, 0); ret = driver->config_get(SR_CONF_SAMPLERATE, &gvar, sdi, NULL); samplerate = g_variant_get_uint64(gvar);