Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 128f7989 authored by Chase Southwood's avatar Chase Southwood Committed by Greg Kroah-Hartman
Browse files

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: default avatarChase Southwood <chase.southwood@gmail.com>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cffd83b6
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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);

	/* Initialize parameters that can be overridden in EEPROM */
	devpriv->s_EeParameters.i_NbrAiChannel = this_board->i_NbrAiChannel;