X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fdevice.c;h=d7c32567fb7971f62925d118151a8a8b0bab7064;hb=468665dfa7a030ba3746e2796a196a47cacf4f76;hp=d0b9e482af0440fee5a34f10ad719194fd1a9fec;hpb=6f1346fbd7bbb6cca97d8a6c02b36156fce24ec2;p=libsigrok.git diff --git a/src/device.c b/src/device.c index d0b9e482..d7c32567 100644 --- a/src/device.c +++ b/src/device.c @@ -360,7 +360,7 @@ SR_PRIV void sr_usbtmc_dev_inst_free(struct sr_usbtmc_dev_inst *usbtmc) SR_API GSList *sr_dev_list(const struct sr_dev_driver *driver) { if (driver && driver->dev_list) - return driver->dev_list(); + return driver->dev_list(driver); else return NULL; } @@ -386,7 +386,7 @@ SR_API int sr_dev_clear(const struct sr_dev_driver *driver) } if (driver->dev_clear) - ret = driver->dev_clear(); + ret = driver->dev_clear(driver); else ret = std_dev_clear(driver, NULL); @@ -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,7 +543,6 @@ 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. */