Removal of sdi->index, step 1: remove it from headers and helper funcs
This commit is contained in:
parent
ce7d3578e3
commit
1b9e567b08
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue