From d6a8df467de03fe211dea7a0c91f63ceb22c5480 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Tue, 24 Jul 2012 15:42:51 +0200 Subject: [PATCH] sr: remove obsolete sr_dev_inst_get() call --- hwdriver.c | 15 --------------- libsigrok-internal.h | 12 ------------ 2 files changed, 27 deletions(-) diff --git a/hwdriver.c b/hwdriver.c index ff9cc5f8..d1181a2f 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -232,21 +232,6 @@ SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status, return sdi; } -SR_PRIV struct sr_dev_inst *sr_dev_inst_get(GSList *dev_insts, int dev_index) -{ - struct sr_dev_inst *sdi; - GSList *l; - - for (l = dev_insts; l; l = l->next) { - sdi = (struct sr_dev_inst *)(l->data); - if (sdi->index == dev_index) - return sdi; - } - sr_warn("could not find device index %d instance", dev_index); - - return NULL; -} - SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi) { g_free(sdi->priv); diff --git a/libsigrok-internal.h b/libsigrok-internal.h index 6874e4ef..1d93d9e5 100644 --- a/libsigrok-internal.h +++ b/libsigrok-internal.h @@ -89,7 +89,6 @@ SR_PRIV int sr_session_send(const struct sr_dev_inst *sdi, /* Generic device instances */ SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status, const char *vendor, const char *model, const char *version); -SR_PRIV struct sr_dev_inst *sr_dev_inst_get(GSList *dev_insts, int dev_index); SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi); SR_PRIV struct sr_probe *sr_probe_new(int index, int type, gboolean enabled, const char *name); @@ -121,15 +120,4 @@ SR_PRIV int ezusb_upload_firmware(libusb_device *dev, int configuration, const char *filename); #endif -/*--- hardware/common/misc.c ------------------------------------------------*/ - -#ifdef HAVE_LIBUSB_1_0 -SR_PRIV int opendev2(int dev_index, struct sr_dev_inst **sdi, - libusb_device *dev, struct libusb_device_descriptor *des, - int *skip, uint16_t vid, uint16_t pid, int interface); -SR_PRIV int opendev3(struct sr_dev_inst **sdi, libusb_device *dev, - struct libusb_device_descriptor *des, - uint16_t vid, uint16_t pid, int interface); -#endif - #endif