Add sdi pointer to struct sr_channel.
This commit is contained in:
parent
5e23fcab88
commit
837b08660a
|
@ -531,6 +531,8 @@ enum sr_channeltype {
|
|||
|
||||
/** Information on single channel. */
|
||||
struct sr_channel {
|
||||
/** The device this channel is attached to. */
|
||||
struct sr_dev_inst *sdi;
|
||||
/** The index of this channel, starting at 0. Logic channels will
|
||||
* be encoded according to this index in SR_DF_LOGIC packets. */
|
||||
int index;
|
||||
|
|
|
@ -57,6 +57,7 @@ SR_PRIV struct sr_channel *sr_channel_new(struct sr_dev_inst *sdi,
|
|||
struct sr_channel *ch;
|
||||
|
||||
ch = g_malloc0(sizeof(struct sr_channel));
|
||||
ch->sdi = sdi;
|
||||
ch->index = index;
|
||||
ch->type = type;
|
||||
ch->enabled = enabled;
|
||||
|
|
Loading…
Reference in New Issue