From 07962655ecd48304d0663e0a91e54f52076c3f8b Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 4 Apr 2015 19:28:19 +0200 Subject: [PATCH] link-mso: Eliminate unneeded NUM_CHANNELS. --- src/hardware/link-mso19/api.c | 2 +- src/hardware/link-mso19/protocol.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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"