staging: comedi: cb_das16_cs: remove n_boards define
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 25 Jun 2012 23:57:36 +0000 (16:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jun 2012 22:30:51 +0000 (15:30 -0700)
The 'n_boards' define is only used one place in the driver.
Just put the ARRAY_SIZE() where used and remove the define.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/cb_das16_cs.c

index 496c3312837e3e43b45b426c7732e0c89c3ec9a5..e1e3ff0cb5fdec805461eb12bea30223a36521ac 100644 (file)
@@ -84,8 +84,6 @@ static const struct das16cs_board das16cs_boards[] = {
         },
 };
 
-#define n_boards ARRAY_SIZE(das16cs_boards)
-
 struct das16cs_private {
        struct pcmcia_device *link;
 
@@ -467,7 +465,7 @@ static const struct das16cs_board *das16cs_probe(struct comedi_device *dev,
 {
        int i;
 
-       for (i = 0; i < n_boards; i++) {
+       for (i = 0; i < ARRAY_SIZE(das16cs_boards); i++) {
                if (das16cs_boards[i].device_id == link->card_id)
                        return das16cs_boards + i;
        }