From: Bert Vermeulen Date: Mon, 8 Sep 2014 01:25:41 +0000 (+0200) Subject: Add private storage pointer to struct sr_channel. X-Git-Tag: libsigrok-0.4.0~1032 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=379d2609651e16956ae51b90e324e82d0e85b854;p=libsigrok.git Add private storage pointer to struct sr_channel. --- diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index 5c042216..3ecc460a 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -469,6 +469,8 @@ struct sr_channel { gboolean enabled; /** Name of channel. */ char *name; + /** Private data for driver use. */ + void *priv; }; /** Structure for groups of channels that have common properties. */ diff --git a/src/device.c b/src/device.c index 434d1066..a331536c 100644 --- a/src/device.c +++ b/src/device.c @@ -251,6 +251,7 @@ SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi) for (l = sdi->channels; l; l = l->next) { ch = l->data; g_free(ch->name); + g_free(ch->priv); g_free(ch); } g_slist_free(sdi->channels);