]> sigrok.org Git - libsigrok.git/commitdiff
Removal of sdi->index, step 1: remove it from headers and helper funcs
authorSoeren Apel <redacted>
Sat, 27 Sep 2014 20:20:51 +0000 (22:20 +0200)
committerBert Vermeulen <redacted>
Mon, 29 Sep 2014 23:42:58 +0000 (01:42 +0200)
include/libsigrok/libsigrok.h
src/device.c
src/libsigrok-internal.h
src/session.c

index 655a4a0ad93a7cc54e4976c8904ba2ee1f27df18..61e0caa897ef8e27076a5ed7831911cf6b6d8cda 100644 (file)
@@ -856,8 +856,6 @@ enum sr_configkey {
 struct sr_dev_inst {
        /** Device driver. */
        struct sr_dev_driver *driver;
-       /** Index of device in driver. */
-       int index;
        /** Device instance status. SR_ST_NOT_FOUND, etc. */
        int status;
        /** Device instance type. SR_INST_USB, etc. */
index 054c7347f91308f22bb4422cf41e66f6e0910112..7bfaa4cfb93e572c04f25010d75e174679d8f44a 100644 (file)
@@ -213,7 +213,7 @@ SR_API gboolean sr_dev_has_option(const struct sr_dev_inst *sdi, int key)
  *  @retval struct sr_dev_inst *. Dynamically allocated, free using
  *              sr_dev_inst_free().
  */
-SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
+SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int status,
                const char *vendor, const char *model, const char *version)
 {
        struct sr_dev_inst *sdi;
@@ -224,7 +224,6 @@ SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
        }
 
        sdi->driver = NULL;
-       sdi->index = index;
        sdi->status = status;
        sdi->inst_type = -1;
        sdi->vendor = vendor ? g_strdup(vendor) : NULL;
index 73162f8e0f00071175d67ce2c7510051d432cf42..67c0aab6a2bab877d12e01a866ef0042e0d03171 100644 (file)
@@ -490,7 +490,7 @@ SR_PRIV struct sr_channel *sr_channel_new(int index, int type,
                gboolean enabled, const char *name);
 
 /* Generic device instances */
-SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
+SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int status,
                const char *vendor, const char *model, const char *version);
 SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi);
 
index f2c5edc40ed14c35db0ba4f1cc625c9dca20518c..11da1378b56508c67c804d66bbb3169f429ea7ad 100644 (file)
@@ -467,8 +467,8 @@ SR_API int sr_session_start(struct sr_session *session)
                }
                if (enabled_channels == 0) {
                        ret = SR_ERR;
-                       sr_err("%s instance %d has no enabled channels!",
-                                       sdi->driver->name, sdi->index);
+                       sr_err("%s using connection %s has no enabled channels!",
+                                       sdi->driver->name, sdi->connection_id);
                        break;
                }