Convert a few more occurrences of d->priv to d->context.

This commit is contained in:
Uwe Hermann 2015-07-09 21:05:44 +02:00
parent 41812aca43
commit 338143ea03
5 changed files with 8 additions and 8 deletions

View 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;

View 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!");

View 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;

View 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;

View 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);