From 128f798918c398b5ae84e5734c3b5df8c35d5d94 Mon Sep 17 00:00:00 2001 From: Chase Southwood Date: Wed, 30 Apr 2014 02:57:59 -0500 Subject: [PATCH] staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars 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 Reviewed-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_1564.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index fe42f9d8f1d1..9962c28a0de0 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; + 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; -- 2.30.2