Convert a few more occurrences of d->priv to d->context.
This commit is contained in:
parent
41812aca43
commit
338143ea03
|
@ -25,7 +25,7 @@ extern uint64_t sl2_samplerates[NUM_SAMPLERATES];
|
||||||
|
|
||||||
static void stop_acquisition(struct sr_dev_inst *sdi)
|
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 dev_context *devc;
|
||||||
struct sr_datafeed_packet packet;
|
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)
|
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 dev_context *devc;
|
||||||
struct sr_datafeed_packet packet;
|
struct sr_datafeed_packet packet;
|
||||||
|
|
||||||
|
|
|
@ -389,7 +389,7 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o
|
||||||
conn = serialcomm = NULL;
|
conn = serialcomm = NULL;
|
||||||
devices = NULL;
|
devices = NULL;
|
||||||
|
|
||||||
drvc = drv->priv;
|
drvc = drv->context;
|
||||||
drvc->instances = NULL;
|
drvc->instances = NULL;
|
||||||
|
|
||||||
sr_spew("scan() called!");
|
sr_spew("scan() called!");
|
||||||
|
|
|
@ -86,7 +86,7 @@ static GSList *scan(struct sr_dev_driver* drv, GSList *options)
|
||||||
int auxtype;
|
int auxtype;
|
||||||
|
|
||||||
devices = NULL;
|
devices = NULL;
|
||||||
drvc = drv->priv;
|
drvc = drv->context;
|
||||||
drvc->instances = NULL;
|
drvc->instances = NULL;
|
||||||
conn = serialcomm = NULL;
|
conn = serialcomm = NULL;
|
||||||
|
|
||||||
|
|
|
@ -582,7 +582,7 @@ static void end_acquisition(struct sr_dev_inst *sdi)
|
||||||
struct dev_context *devc;
|
struct dev_context *devc;
|
||||||
struct sr_datafeed_packet packet;
|
struct sr_datafeed_packet packet;
|
||||||
|
|
||||||
drvc = sdi->driver->priv;
|
drvc = sdi->driver->context;
|
||||||
devc = sdi->priv;
|
devc = sdi->priv;
|
||||||
|
|
||||||
if (devc->state == STATE_IDLE)
|
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;
|
sdi = cb_data;
|
||||||
devc = sdi->priv;
|
devc = sdi->priv;
|
||||||
drvc = sdi->driver->priv;
|
drvc = sdi->driver->context;
|
||||||
|
|
||||||
if (!devc || !drvc)
|
if (!devc || !drvc)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -97,7 +97,7 @@ void srtest_set_samplerate(struct sr_dev_driver *driver, uint64_t samplerate)
|
||||||
struct sr_dev_inst *sdi;
|
struct sr_dev_inst *sdi;
|
||||||
GVariant *gvar;
|
GVariant *gvar;
|
||||||
|
|
||||||
sdi = g_slist_nth_data(driver->priv, 0);
|
sdi = g_slist_nth_data(driver->context, 0);
|
||||||
|
|
||||||
gvar = g_variant_new_uint64(samplerate);
|
gvar = g_variant_new_uint64(samplerate);
|
||||||
ret = driver->config_set(SR_CONF_SAMPLERATE, gvar, sdi, NULL);
|
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;
|
struct sr_dev_inst *sdi;
|
||||||
GVariant *gvar;
|
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);
|
ret = driver->config_get(SR_CONF_SAMPLERATE, &gvar, sdi, NULL);
|
||||||
samplerate = g_variant_get_uint64(gvar);
|
samplerate = g_variant_get_uint64(gvar);
|
||||||
|
|
Loading…
Reference in New Issue