From: Uwe Hermann Date: Sat, 4 Apr 2015 17:28:19 +0000 (+0200) Subject: link-mso: Eliminate unneeded NUM_CHANNELS. X-Git-Tag: libsigrok-0.4.0~543 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=07962655ecd48304d0663e0a91e54f52076c3f8b;p=libsigrok.git link-mso: Eliminate unneeded NUM_CHANNELS. --- diff --git a/src/hardware/link-mso19/api.c b/src/hardware/link-mso19/api.c index d75debb8..7d0fbf8b 100644 --- a/src/hardware/link-mso19/api.c +++ b/src/hardware/link-mso19/api.c @@ -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]); } diff --git a/src/hardware/link-mso19/protocol.h b/src/hardware/link-mso19/protocol.h index 809d7f87..e795f38b 100644 --- a/src/hardware/link-mso19/protocol.h +++ b/src/hardware/link-mso19/protocol.h @@ -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"