diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-07-18 19:03:08 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-19 16:51:38 -0700 |
commit | bdc1afa388b89285d68de2ae423dd0d25cfc1d62 (patch) | |
tree | 45c654e05a93947488953e63acc0061aaff1e3e1 /drivers/staging/comedi | |
parent | 6e4996bcd82453e43b324e53f5353e5c0fe625a2 (diff) | |
download | linux-bdc1afa388b89285d68de2ae423dd0d25cfc1d62.tar.bz2 |
staging: comedi: ke_counter: remove the cnt_board_nbr macro
This macro is an open-coded version of ARRAY_SIZE(). Use that
instead.
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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/ke_counter.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/ke_counter.c b/drivers/staging/comedi/drivers/ke_counter.c index 4153977995ca..d4e9292483a0 100644 --- a/drivers/staging/comedi/drivers/ke_counter.c +++ b/drivers/staging/comedi/drivers/ke_counter.c @@ -62,8 +62,6 @@ static const struct cnt_board_struct cnt_boards[] = { .cnt_bits = 24} }; -#define cnt_board_nbr (sizeof(cnt_boards)/sizeof(struct cnt_board_struct)) - /*-- counter write ----------------------------------------------------------*/ /* This should be used only for resetting the counters; maybe it is better @@ -132,7 +130,7 @@ static struct pci_dev *cnt_find_pci_dev(struct comedi_device *dev, if (pcidev->vendor != PCI_VENDOR_ID_KOLTER) continue; - for (i = 0; i < cnt_board_nbr; i++) { + for (i = 0; i < ARRAY_SIZE(cnt_boards); i++) { board = &cnt_boards[i]; if (board->device_id != pcidev->device) continue; |