]> sigrok.org Git - libsigrok.git/commitdiff
ftdi-la: order the channels properly
authorSergey Alirzaev <redacted>
Thu, 14 Apr 2016 11:17:49 +0000 (14:17 +0300)
committerUwe Hermann <redacted>
Sun, 17 Apr 2016 12:54:08 +0000 (14:54 +0200)
src/hardware/ftdi-la/api.c

index cd70bb7feeeed401de5cc07cb01c6f429c3eabf6..d9936e7086b1954e8fc88fa2b1973181f7b4efd6 100644 (file)
@@ -162,7 +162,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                sdi->priv = devc;
 
                for (char *const *chan = &(desc->channel_names[0]); *chan; chan++)
-                       sr_channel_new(sdi, &(desc->channel_names[0]) - chan,
+                       sr_channel_new(sdi, chan - &(desc->channel_names[0]),
                                        SR_CHANNEL_LOGIC, TRUE, *chan);
 
                devices = g_slist_append(devices, sdi);