SR_MHZ(20),
};
-static const char *channel_names[NUM_CHANNELS + 1] = {
+static const char *channel_names[] = {
"0", "1", "2", "3",
- NULL,
};
SR_PRIV struct sr_dev_driver ikalogic_scanalogic2_driver_info;
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
struct device_info dev_info;
- int ret, i;
+ unsigned int i;
+ int ret;
(void)options;
sdi->inst_type = SR_INST_USB;
sdi->conn = usb;
- for (i = 0; channel_names[i]; i++)
- devc->channels[i] = sr_channel_new(sdi, i, SR_CHANNEL_LOGIC,
- TRUE, channel_names[i]);
+ for (i = 0; i < ARRAY_SIZE(channel_names); i++)
+ devc->channels[i] = sr_channel_new(sdi, i,
+ SR_CHANNEL_LOGIC, TRUE, channel_names[i]);
devc->state = STATE_IDLE;
devc->next_state = STATE_IDLE;
(void)cg;
ret = SR_OK;
-
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,