]> Pileus Git - ~andy/linux/commit
staging: comedi: addi_common.c: fix the test for the PCI bars
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 7 Nov 2012 00:34:24 +0000 (17:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 19:46:41 +0000 (11:46 -0800)
commitc965c8b7d2538d10d77a320e84ddbe51d221f373
tree1831466c741e6e9c99543a3408840b9390d6c0ea
parent891e62c33d9cdbcdb8adfaddd111e91a39d0f5fe
staging: comedi: addi_common.c: fix the test for the PCI bars

Commit: 0fcdafb83b9b4e5c48410b3ca91b1f237ad60dbc
staging: comedi: addi-data: cleanup reading of the PCI bars

Changed this test before reading the PCI bars:

if ((this_board->pc_EepromChip == NULL)
|| (strcmp(this_board->pc_EepromChip, ADDIDATA_9054) != 0)) {

to this:

if (!this_board->pc_EepromChip ||
    !strcmp(this_board->pc_EepromChip, ADDIDATA_9054)) {

I just noticed that the strcmp test is wrong.

This fixes the test and adds a comment for it.

This error "broke" the addi-data drivers but they are broken anyway
since they don't follow the comedi core API.

The addi_apci_1032 driver has been converted to follow the comedi core
API. This error effects that driver since the iobase for it should be
found in PCI bar 1 not 2. This fixes that also.

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>
drivers/staging/comedi/drivers/addi-data/addi_common.c
drivers/staging/comedi/drivers/addi_apci_1032.c