summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-11-11 16:33:45 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2014-11-11 16:33:45 +0100
commit021922274c9a92b2f3a830956084185f0a7a4ed2 (patch)
tree0327e656f3fac37bb24f9e95860735927fd129ed
parent47de7a6688ae9e51c378a462fbfc601bb01bf237 (diff)
downloadsigrok-test-021922274c9a92b2f3a830956084185f0a7a4ed2.tar.gz
sigrok-test-021922274c9a92b2f3a830956084185f0a7a4ed2.zip
Use getters now that 'struct sr_dev_inst' is opaque.
-rw-r--r--decoder/runtc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/decoder/runtc.c b/decoder/runtc.c
index 9249cfb..2193309 100644
--- a/decoder/runtc.c
+++ b/decoder/runtc.c
@@ -282,13 +282,16 @@ static void sr_cb(const struct sr_dev_inst *sdi,
uint64_t samplerate;
int num_samples;
static int samplecnt = 0;
+ struct sr_dev_driver *driver;
sess = cb_data;
+ driver = sr_dev_inst_driver_get(sdi);
+
switch (packet->type) {
case SR_DF_HEADER:
DBG("Received SR_DF_HEADER");
- if (sr_config_get(sdi->driver, sdi, NULL, SR_CONF_SAMPLERATE,
+ if (sr_config_get(driver, sdi, NULL, SR_CONF_SAMPLERATE,
&gvar) != SR_OK) {
ERR("Getting samplerate failed");
break;
@@ -341,6 +344,7 @@ static int run_testcase(char *infile, GSList *pdlist, struct output *op)
const char *s;
struct sr_dev_inst *sdi;
uint64_t unitsize;
+ struct sr_dev_driver *driver;
if (op->outfile) {
if ((op->outfd = open(op->outfile, O_CREAT|O_WRONLY, 0600)) == -1) {
@@ -355,7 +359,8 @@ static int run_testcase(char *infile, GSList *pdlist, struct output *op)
sr_session_dev_list(sr_sess, &devices);
sdi = devices->data;
- sr_config_get(sdi->driver, sdi, NULL, SR_CONF_CAPTURE_UNITSIZE, &gvar);
+ driver = sr_dev_inst_driver_get(sdi);
+ sr_config_get(driver, sdi, NULL, SR_CONF_CAPTURE_UNITSIZE, &gvar);
unitsize = g_variant_get_uint64(gvar);
g_variant_unref(gvar);