From: H Hartley Sweeten Date: Sat, 8 Sep 2012 00:38:30 +0000 (-0700) Subject: staging: comedi: me4000: remove ME4000_BOARD_VERSIONS X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82933302306e8e7d7354a8fdfb242f33506bd892;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git staging: comedi: me4000: remove ME4000_BOARD_VERSIONS Remove the terminating entry in the boardinfo so that ARRAY_SIZE works correctly. Then remove ME4000_BOARD_VERSIONS and just use ARRAY_SIZE in the probe. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index 050f0e416089..028c20f6dcc0 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -81,12 +81,8 @@ static const struct me4000_board me4000_boards[] = { {"ME-4680i", 0x4681, {4, 4}, {32, 0, 16, 1}, {4}, {3} }, {"ME-4680s", 0x4682, {4, 4}, {32, 8, 16, 1}, {4}, {3} }, {"ME-4680is", 0x4683, {4, 4}, {32, 8, 16, 1}, {4}, {3} }, - - {0}, }; -#define ME4000_BOARD_VERSIONS (ARRAY_SIZE(me4000_boards) - 1) - /*----------------------------------------------------------------------------- Meilhaus function prototypes ---------------------------------------------------------------------------*/ @@ -136,7 +132,7 @@ static int me4000_probe(struct comedi_device *dev, struct comedi_devconfig *it) */ for_each_pci_dev(pci_device) { if (pci_device->vendor == PCI_VENDOR_ID_MEILHAUS) { - for (i = 0; i < ME4000_BOARD_VERSIONS; i++) { + for (i = 0; i < ARRAY_SIZE(me4000_boards); i++) { if (me4000_boards[i].device_id == pci_device->device) { /*