[PATCH 04/10] staging: comedi: addi_apci_1710: remove i_ADDI_Reset

H Hartley Sweeten hartleys at visionengravers.com
Thu Nov 1 18:09:27 UTC 2012


This driver is now separate from the "common" code used with the
addi-data drivers. There is no need to use i_ADDI_Reset() to call
the correct "reset" function.

Remove the i_ADDI_Reset() function and the 'reset' pointer to the
real function from the boardinfo and just call the function directly
where needed.

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/addi_apci_1710.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_1710.c b/drivers/staging/comedi/drivers/addi_apci_1710.c
index a5cfc9b..fdc9060 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1710.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1710.c
@@ -33,7 +33,6 @@ static const struct addi_board apci1710_boardtypes[] = {
 		.i_IorangeBase2		= 256,
 		.i_PCIEeprom		= ADDIDATA_NO_EEPROM,
 		.interrupt		= v_APCI1710_Interrupt,
-		.reset			= i_APCI1710_Reset,
 	},
 };
 
@@ -46,14 +45,6 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
 	return IRQ_RETVAL(1);
 }
 
-static int i_ADDI_Reset(struct comedi_device *dev)
-{
-	const struct addi_board *this_board = comedi_board(dev);
-
-	this_board->reset(dev);
-	return 0;
-}
-
 static const void *apci1710_find_boardinfo(struct comedi_device *dev,
 					   struct pci_dev *pcidev)
 {
@@ -192,7 +183,7 @@ static int apci1710_attach_pci(struct comedi_device *dev,
 
 	devpriv->s_BoardInfos.ui_Address = pci_resource_start(pcidev, 2);
 
-	i_ADDI_Reset(dev);
+	i_APCI1710_Reset(dev);
 	return 0;
 }
 
@@ -204,7 +195,7 @@ static void apci1710_detach(struct comedi_device *dev)
 
 	if (devpriv) {
 		if (dev->iobase)
-			i_ADDI_Reset(dev);
+			i_APCI1710_Reset(dev);
 		if (dev->irq)
 			free_irq(dev->irq, dev);
 		if ((this_board->pc_EepromChip == NULL) ||
-- 
1.7.11




More information about the devel mailing list