Skip to content

Commit

Permalink
staging: comedi: cb_das16_cs: remove n_boards define
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jun 26, 2012
1 parent 16a8cdf commit 1efc5d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/comedi/drivers/cb_das16_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1efc5d5

Please sign in to comment.