summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-06-30 04:37:25 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-07 02:46:05 +0400
commit2be036653663f809d1034d365f8285a967e589da (patch)
treef5ddbd6570cf69f324aeeffb26448afbd2569fdc
parent289a40339149300c42308afd917a5c9dbbc9bcd9 (diff)
downloadlinux-2be036653663f809d1034d365f8285a967e589da.tar.xz
staging: comedi: ni_670x: remove n_ni_670x_boards macro
This macro is simply the ARRAY_SIZE() of the boardinfo. Just use the ARRAY_SIZE and remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/ni_670x.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c
index b75eed4388c6..d53d20c6392a 100644
--- a/drivers/staging/comedi/drivers/ni_670x.c
+++ b/drivers/staging/comedi/drivers/ni_670x.c
@@ -96,8 +96,6 @@ struct ni_670x_private {
unsigned int ao_readback[32];
};
-#define n_ni_670x_boards ARRAY_SIZE(ni_670x_boards)
-
static struct comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} };
static int ni_670x_ao_winsn(struct comedi_device *dev,
@@ -210,7 +208,7 @@ static int ni_670x_find_device(struct comedi_device *dev, int bus, int slot)
continue;
}
- for (i = 0; i < n_ni_670x_boards; i++) {
+ for (i = 0; i < ARRAY_SIZE(ni_670x_boards); i++) {
if (mite_device_id(mite) == ni_670x_boards[i].dev_id) {
dev->board_ptr = ni_670x_boards + i;
devpriv->mite = mite;