From: H Hartley Sweeten Date: Mon, 25 Jun 2012 23:57:36 +0000 (-0700) Subject: staging: comedi: cb_das16_cs: remove n_boards define X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1efc5d53b7c1355a3491061587153c8f89613aaa;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Frank Mori Hess Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index 496c3312837e..e1e3ff0cb5fd 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c @@ -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; }