]> sigrok.org Git - libsigrok.git/commitdiff
Convert a few more occurrences of d->priv to d->context.
authorUwe Hermann <redacted>
Thu, 9 Jul 2015 19:05:44 +0000 (21:05 +0200)
committerUwe Hermann <redacted>
Fri, 10 Jul 2015 16:19:24 +0000 (18:19 +0200)
src/hardware/ikalogic-scanalogic2/protocol.c
src/hardware/motech-lps-30x/api.c
src/hardware/norma-dmm/api.c
src/hardware/sysclk-lwla/protocol.c
tests/lib.c

index 70ef28094ea42a4165d438411e425b6d96eac309..90c16ef740e68b650e5ab55d8bfd8469fb9012ac 100644 (file)
@@ -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;
 
index 19f530de1c9a31d7b26e32ef7b1f6dd7d7ef15e6..b9fee49d603d42a1f248cec6b84191fd0888c048 100644 (file)
@@ -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!");
index c86f9c7d40a48ec4259a8a45bef17585615e3f8a..fca56b363eb34321f66125fe5f4ba41390131f93 100644 (file)
@@ -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;
 
index 894c8efeb802990a5d409b704043dadf10686d75..f22d80adea47ab7c8f22928e23423297fcea94f2 100644 (file)
@@ -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;
index cb8b8a48b352f017e5a068e7e7259c23e2ee9001..0da9b7aba1759926ce0ba787623fca32fde2073f 100644 (file)
@@ -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);