X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fdevice.c;h=01f413486357d546817c05c7bffc27974c031d13;hb=41812aca436805b0614f2a8f31cf2f8ce494aea0;hp=b1c7eae120c7455dc90124ced38366fc5434631f;hpb=4f840ce965b1c30c5ab75afecc56193cbaf5c1b3;p=libsigrok.git diff --git a/src/device.c b/src/device.c index b1c7eae1..01f41348 100644 --- a/src/device.c +++ b/src/device.c @@ -520,11 +520,10 @@ SR_API const char *sr_dev_inst_sernum_get(const struct sr_dev_inst *sdi) */ SR_API const char *sr_dev_inst_connid_get(const struct sr_dev_inst *sdi) { +#ifdef HAVE_LIBUSB_1_0 struct drv_context *drvc; int r, cnt, i, a, b; char connection_id[64]; - -#ifdef HAVE_LIBUSB_1_0 struct sr_usb_dev_inst *usb; struct libusb_device **devlist; struct libusb_device_descriptor des; @@ -544,12 +543,11 @@ SR_API const char *sr_dev_inst_connid_get(const struct sr_dev_inst *sdi) } #endif - #ifdef HAVE_LIBUSB_1_0 if ((!sdi->connection_id) && (sdi->inst_type == SR_INST_USB)) { /* connection_id isn't populated, let's do that here. */ - drvc = sdi->driver->priv; + drvc = sdi->driver->context; usb = sdi->conn; if ((cnt = libusb_get_device_list(drvc->sr_ctx->libusb_ctx, &devlist)) < 0) {