Re: [PATCH 4/6 v2] staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars

2014-04-29 Thread Ian Abbott

On 2014-04-29 09:35, Chase Southwood wrote:

This driver only uses PCI bar 1 (devpriv->i_IobaseAmcc), and PCI bar 2
(dev->iobase) doon't bother reading the unused PCI bars.


The description needs fixing as it's back to using PCI bar 0 and 1. 
Also, there's a typo: doon't -> don't. :)


--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/6 v2] staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars

2014-04-29 Thread Chase Southwood
This driver only uses PCI bar 1 (devpriv->i_IobaseAmcc), and PCI bar 2
(dev->iobase) doon't bother reading the unused PCI bars.

Signed-off-by: Chase Southwood 
Cc: Ian Abbott 
Cc: H Hartley Sweeten 
---
2: Bad PCI bar numbers corrected.

 drivers/staging/comedi/drivers/addi_apci_1564.c | 11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c 
b/drivers/staging/comedi/drivers/addi_apci_1564.c
index fe42f9d..7e42d47 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -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;
-   devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
-   devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);
-   devpriv->i_IobaseReserved = pci_resource_start(pcidev, 3);
+   dev->iobase = pci_resource_start(pcidev, 1);
+   devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
 
/* Initialize parameters that can be overridden in EEPROM */
devpriv->s_EeParameters.i_NbrAiChannel = this_board->i_NbrAiChannel;
-- 
1.9.0

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