X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=output%2Fols.c;h=e0196717e7a67ef8db385bc12c1c1fa3c3cadc66;hb=94c26b08fdc2568a33e176b895c63048a4b66464;hp=a6ce6ea72846f072c071217d5829c9d9f67e6f86;hpb=c73d2ea421c2b425c3f0ae33bce2bfd0c448ca5f;p=libsigrok.git diff --git a/output/ols.c b/output/ols.c index a6ce6ea7..e0196717 100644 --- a/output/ols.c +++ b/output/ols.c @@ -53,16 +53,16 @@ static int init(struct sr_output *o) ctx->num_samples = 0; num_enabled_probes = 0; - for (l = o->device->probes; l; l = l->next) { + for (l = o->dev->probes; l; l = l->next) { probe = l->data; if (probe->enabled) num_enabled_probes++; } ctx->unitsize = (num_enabled_probes + 7) / 8; - if (o->device->plugin && sr_dev_has_hwcap(o->device, SR_HWCAP_SAMPLERATE)) - samplerate = *((uint64_t *) o->device->plugin->get_device_info( - o->device->plugin_index, SR_DI_CUR_SAMPLERATE)); + if (o->dev->driver && sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) + samplerate = *((uint64_t *) o->dev->driver->dev_info_get( + o->dev->driver_index, SR_DI_CUR_SAMPLERATE)); else samplerate = 0;