From: H Hartley Sweeten Date: Tue, 14 Oct 2014 17:44:30 +0000 (-0700) Subject: staging: comedi: addi_common.h: remove boardinfo 'i_IorangeBase1' X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=d75a78435c7d0ca945de0ba17e5814a0875700c5;p=deliverable%2Flinux.git 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h b/drivers/staging/comedi/drivers/addi-data/addi_common.h index 9def296568ff..0752a61a7c2a 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.h +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h @@ -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 */ diff --git a/drivers/staging/comedi/drivers/addi_apci_035.c b/drivers/staging/comedi/drivers/addi_apci_035.c index a5e3d325165a..a197f64e63c1 100644 --- a/drivers/staging/comedi/drivers/addi_apci_035.c +++ b/drivers/staging/comedi/drivers/addi_apci_035.c @@ -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); - + dev->iobase = pci_resource_start(pcidev, 1); devpriv->iobase = dev->iobase; devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0); devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2); diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c index 03e65a106816..c69510bcf931 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1500.c +++ b/drivers/staging/comedi/drivers/addi_apci_1500.c @@ -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); - + dev->iobase = pci_resource_start(pcidev, 1); devpriv->iobase = dev->iobase; devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0); devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);