]> sigrok.org Git - libsigrok.git/commitdiff
link-mso: Eliminate unneeded NUM_CHANNELS.
authorUwe Hermann <redacted>
Sat, 4 Apr 2015 17:28:19 +0000 (19:28 +0200)
committerUwe Hermann <redacted>
Tue, 7 Apr 2015 00:02:43 +0000 (02:02 +0200)
src/hardware/link-mso19/api.c
src/hardware/link-mso19/protocol.h

index d75debb84420510dafdd0dda68e52941eff2e81f..7d0fbf8b21030e080f699c6090b0fa8251b7e8f6 100644 (file)
@@ -213,7 +213,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                sdi->driver = di;
                sdi->priv = devc;
 
-               for (i = 0; i < NUM_CHANNELS; i++) {
+               for (i = 0; i < ARRAY_SIZE(channel_names); i++) {
                        chtype = (i == 0) ? SR_CHANNEL_ANALOG : SR_CHANNEL_LOGIC;
                        sr_channel_new(sdi, i, chtype, TRUE, channel_names[i]);
                }
index 809d7f87177648b5756f57b20a03a30a410639b6..e795f38b38618d1e3a562b693ef4266abe49fd00 100644 (file)
@@ -34,7 +34,6 @@
 #define USB_VENDOR             "3195"
 #define USB_PRODUCT            "f190"
 
-#define NUM_CHANNELS           (1 + 8)
 #define NUM_TRIGGER_STAGES     4
 #define TRIGGER_TYPE           "01"    //the first r/f is used for the whole group
 #define SERIALCOMM             "460800/8n1/flow=2"