X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fvictor-dmm%2Fapi.c;h=e82302618693c76f09de61eb89e847c9063785c8;hp=7ed2bf435fb0081032023debec8cf999470d5bb9;hb=41812aca436805b0614f2a8f31cf2f8ce494aea0;hpb=c11a1e6122998b247df66c59d2076eb814818497 diff --git a/src/hardware/victor-dmm/api.c b/src/hardware/victor-dmm/api.c index 7ed2bf43..e8230261 100644 --- a/src/hardware/victor-dmm/api.c +++ b/src/hardware/victor-dmm/api.c @@ -67,7 +67,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) (void)options; - drvc = di->priv; + drvc = di->context; devices = NULL; libusb_get_device_list(drvc->sr_ctx->libusb_ctx, &devlist); @@ -107,19 +107,19 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) static GSList *dev_list(const struct sr_dev_driver *di) { - return ((struct drv_context *)(di->priv))->instances; + return ((struct drv_context *)(di->context))->instances; } static int dev_open(struct sr_dev_inst *sdi) { struct sr_dev_driver *di = sdi->driver; - struct drv_context *drvc = di->priv; + struct drv_context *drvc = di->context; struct sr_usb_dev_inst *usb; libusb_device **devlist; int ret, i; char connection_id[64]; - if (!di->priv) { + if (!di->context) { sr_err("Driver was not initialized."); return SR_ERR; } @@ -168,7 +168,7 @@ static int dev_close(struct sr_dev_inst *sdi) struct sr_dev_driver *di = sdi->driver; struct sr_usb_dev_inst *usb; - if (!di->priv) { + if (!di->context) { sr_err("Driver was not initialized."); return SR_ERR; } @@ -192,7 +192,7 @@ static int cleanup(const struct sr_dev_driver *di) int ret; struct drv_context *drvc; - if (!(drvc = di->priv)) + if (!(drvc = di->context)) /* Can get called on an unused driver, doesn't matter. */ return SR_OK; @@ -237,7 +237,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd if (sdi->status != SR_ST_ACTIVE) return SR_ERR_DEV_CLOSED; - if (!di->priv) { + if (!di->context) { sr_err("Driver was not initialized."); return SR_ERR; } @@ -343,7 +343,7 @@ static int handle_events(int fd, int revents, void *cb_data) sdi = cb_data; devc = sdi->priv; di = sdi->driver; - drvc = di->priv; + drvc = di->context; if (devc->limit_msec) { now = g_get_monotonic_time() / 1000; @@ -371,7 +371,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) { struct sr_dev_driver *di = sdi->driver; struct dev_context *devc; - struct drv_context *drvc = di->priv; + struct drv_context *drvc = di->context; struct sr_usb_dev_inst *usb; struct libusb_transfer *transfer; int ret; @@ -380,7 +380,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) if (sdi->status != SR_ST_ACTIVE) return SR_ERR_DEV_CLOSED; - if (!di->priv) { + if (!di->context) { sr_err("Driver was not initialized."); return SR_ERR; } @@ -419,7 +419,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) struct sr_dev_driver *di = sdi->driver; (void)cb_data; - if (!di->priv) { + if (!di->context) { sr_err("Driver was not initialized."); return SR_ERR; } @@ -450,5 +450,5 @@ SR_PRIV struct sr_dev_driver victor_dmm_driver_info = { .dev_close = dev_close, .dev_acquisition_start = dev_acquisition_start, .dev_acquisition_stop = dev_acquisition_stop, - .priv = NULL, + .context = NULL, };