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

Commit d75a7843 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: addi_common.h: remove boardinfo 'i_IorangeBase1'



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: 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 23abae88
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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 */
+1 −6
Original line number Diff line number Diff line
@@ -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);

	devpriv->iobase = dev->iobase;
	devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
	devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);
+1 −6
Original line number Diff line number Diff line
@@ -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);

	devpriv->iobase = dev->iobase;
	devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
	devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);