Skip to contentSkip to conversation

staging: comedi: cb_das16_cs: remove n_boards define

PATCH In review H Hartley Sweeten 1 participant 1 message Jun 25, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 16/33 staging: comedi: cb_das16_cs: remove n_boards define

The 'n_boards' define is only used one place in the driver. Just put the ARRAY_SIZE() where used and remove the define.

Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/comedi/drivers/cb_das16_cs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/comedi/drivers/cb_das16_cs.c +1 -3
index 496c331..e1e3ff0 100644
@@ -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;
 	}
Signature · 1 line
1.7.11