This macro is an open-coded version of the kernels ARRAY_SIZE
macro. Use the kernel provided macro 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>
.ai_acquisition_period_min_ns = PCI9111_AI_ACQUISITION_PERIOD_MIN_NS}
};
-#define pci9111_board_nbr \
- (sizeof(pci9111_boards)/sizeof(struct pci9111_board))
-
/* Private data structure */
struct pci9111_private_data {
for_each_pci_dev(pcidev) {
if (pcidev->vendor != PCI_VENDOR_ID_ADLINK)
continue;
- for (i = 0; i < pci9111_board_nbr; i++) {
+ for (i = 0; i < ARRAY_SIZE(pci9111_boards); i++) {
if (pcidev->device != pci9111_boards[i].device_id)
continue;
if (bus || slot) {