Skip to content

Commit

Permalink
staging: comedi: ni_670x: remove n_ni_670x_boards macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 6, 2012
1 parent 289a403 commit 2be0366
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/comedi/drivers/ni_670x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2be0366

Please sign in to comment.