staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the...
authorChase Southwood <chase.southwood@gmail.com>
Wed, 30 Apr 2014 07:57:59 +0000 (02:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 May 2014 23:56:49 +0000 (19:56 -0400)
This driver only uses PCI bar 0 (devpriv->i_IobaseAmcc), and PCI bar 1
(dev->iobase), don't bother reading the unused PCI bars.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi_apci_1564.c

index fe42f9d..9962c28 100644 (file)
@@ -65,15 +65,8 @@ static int apci1564_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);
-
-       devpriv->iobase = dev->iobase;
+       dev->iobase = pci_resource_start(pcidev, 1);
        devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
-       devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);
-       devpriv->i_IobaseReserved = pci_resource_start(pcidev, 3);
 
        /* Initialize parameters that can be overridden in EEPROM */
        devpriv->s_EeParameters.i_NbrAiChannel = this_board->i_NbrAiChannel;