+static int create_channels_feed_queues(struct sr_dev_inst *sdi,
+ struct dev_context *devc)
+{
+ size_t i;
+ struct sr_channel *sr_ch;
+ const struct atorch_channel_desc *at_ch;
+ struct feed_queue_analog *feed;
+ const struct atorch_device_profile *p;
+
+ p = devc->profile;
+ devc->feeds = g_malloc0(p->channel_count * sizeof(devc->feeds[0]));
+ for (i = 0; i < p->channel_count; i++) {
+ at_ch = &p->channels[i];
+ sr_ch = sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE, at_ch->name);
+ feed = feed_queue_analog_alloc(sdi, 1, at_ch->digits, sr_ch);
+ feed_queue_analog_mq_unit(feed, at_ch->mq, at_ch->flags, at_ch->unit);
+ feed_queue_analog_scale_offset(feed, &at_ch->scale, NULL);
+ devc->feeds[i] = feed;
+ }