]> sigrok.org Git - libsigrok.git/commitdiff
Add private storage pointer to struct sr_channel.
authorBert Vermeulen <redacted>
Mon, 8 Sep 2014 01:25:41 +0000 (03:25 +0200)
committerBert Vermeulen <redacted>
Mon, 8 Sep 2014 10:45:21 +0000 (12:45 +0200)
include/libsigrok/libsigrok.h
src/device.c

index 5c04221611825240a1b7ecc33abaf6f1a40bf6a9..3ecc460a28fa9bb387443ec4e5f180615ebc22cd 100644 (file)
@@ -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. */
index 434d1066aac692d7a8a6f732f80938cc02f7ff02..a331536c733b9c82fff8cede49025e45e30026de 100644 (file)
@@ -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);