Add private storage pointer to struct sr_channel.
This commit is contained in:
parent
478c8d923e
commit
379d260965
|
@ -469,6 +469,8 @@ struct sr_channel {
|
||||||
gboolean enabled;
|
gboolean enabled;
|
||||||
/** Name of channel. */
|
/** Name of channel. */
|
||||||
char *name;
|
char *name;
|
||||||
|
/** Private data for driver use. */
|
||||||
|
void *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Structure for groups of channels that have common properties. */
|
/** Structure for groups of channels that have common properties. */
|
||||||
|
|
|
@ -251,6 +251,7 @@ SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi)
|
||||||
for (l = sdi->channels; l; l = l->next) {
|
for (l = sdi->channels; l; l = l->next) {
|
||||||
ch = l->data;
|
ch = l->data;
|
||||||
g_free(ch->name);
|
g_free(ch->name);
|
||||||
|
g_free(ch->priv);
|
||||||
g_free(ch);
|
g_free(ch);
|
||||||
}
|
}
|
||||||
g_slist_free(sdi->channels);
|
g_slist_free(sdi->channels);
|
||||||
|
|
Loading…
Reference in New Issue