mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
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>
This commit is contained in:
parent
6e4996bcd8
commit
bdc1afa388
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue