This member of the boardinfo is used as a flag to determine what PCI BAR
to use for the main 'iobase' used by the driver.

Remove the boardinfo member and refactor the (*auto_attach) of the drivers
to use the correct PCI BAR.

Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com>
Cc: Ian Abbott <abbo...@mev.co.uk>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 drivers/staging/comedi/drivers/addi-data/addi_common.h | 1 -
 drivers/staging/comedi/drivers/addi_apci_035.c         | 7 +------
 drivers/staging/comedi/drivers/addi_apci_1500.c        | 7 +------
 3 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h 
b/drivers/staging/comedi/drivers/addi-data/addi_common.h
index 9def296..0752a61 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_common.h
+++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h
@@ -20,7 +20,6 @@
 
 struct addi_board {
        const char *name;
-       int i_IorangeBase1;
        int i_PCIEeprom;        /*  eeprom present or not */
        char *pc_EepromChip;    /*  type of chip */
        int i_NbrAiChannel;     /*  num of A/D chans */
diff --git a/drivers/staging/comedi/drivers/addi_apci_035.c 
b/drivers/staging/comedi/drivers/addi_apci_035.c
index a5e3d32..a197f64 100644
--- a/drivers/staging/comedi/drivers/addi_apci_035.c
+++ b/drivers/staging/comedi/drivers/addi_apci_035.c
@@ -15,7 +15,6 @@
 static const struct addi_board apci035_boardtypes[] = {
        {
                .name                   = "apci035",
-               .i_IorangeBase1         = APCI035_ADDRESS_RANGE,
                .i_PCIEeprom            = 1,
                .pc_EepromChip          = "S5920",
                .i_NbrAiChannel         = 16,
@@ -67,11 +66,7 @@ static int apci035_auto_attach(struct comedi_device *dev,
        if (ret)
                return ret;
 
-       if (this_board->i_IorangeBase1)
-               dev->iobase = pci_resource_start(pcidev, 1);
-       else
-               dev->iobase = pci_resource_start(pcidev, 0);
-
+       dev->iobase = pci_resource_start(pcidev, 1);
        devpriv->iobase = dev->iobase;
        devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
        devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);
diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c 
b/drivers/staging/comedi/drivers/addi_apci_1500.c
index 03e65a1..c69510b 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1500.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1500.c
@@ -13,7 +13,6 @@
 static const struct addi_board apci1500_boardtypes[] = {
        {
                .name                   = "apci1500",
-               .i_IorangeBase1         = APCI1500_ADDRESS_RANGE,
                .i_PCIEeprom            = 0,
                .i_NbrDiChannel         = 16,
                .i_NbrDoChannel         = 16,
@@ -60,11 +59,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
        if (ret)
                return ret;
 
-       if (this_board->i_IorangeBase1)
-               dev->iobase = pci_resource_start(pcidev, 1);
-       else
-               dev->iobase = pci_resource_start(pcidev, 0);
-
+       dev->iobase = pci_resource_start(pcidev, 1);
        devpriv->iobase = dev->iobase;
        devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
        devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);
-- 
2.0.3

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to