]> Pileus Git - ~andy/linux/commitdiff
staging: comedi: addi_apci_1032: remove i_ADDI_Reset()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 5 Nov 2012 21:34:40 +0000 (14:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Nov 2012 08:30:54 +0000 (09:30 +0100)
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@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi_apci_1032.c

index 0ba363ce26404b33c0d7b3aa166b8d76f1ed895c..bc153c300efdaee8863a3a97a9e5982d84810df3 100644 (file)
@@ -22,7 +22,6 @@ static const struct addi_board apci1032_boardtypes[] = {
                .pc_EepromChip          = ADDIDATA_93C76,
                .i_NbrDiChannel         = 32,
                .interrupt              = v_APCI1032_Interrupt,
-               .reset                  = i_APCI1032_Reset,
                .di_config              = i_APCI1032_ConfigDigitalInput,
                .di_read                = i_APCI1032_Read1DigitalInput,
                .di_bits                = i_APCI1032_ReadMoreDigitalInput,
@@ -55,14 +54,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 *addi_find_boardinfo(struct comedi_device *dev,
                                       struct pci_dev *pcidev)
 {
@@ -308,7 +299,7 @@ static int apci1032_attach_pci(struct comedi_device *dev,
                s->type = COMEDI_SUBD_UNUSED;
        }
 
-       i_ADDI_Reset(dev);
+       i_APCI1032_Reset(dev);
        return 0;
 }
 
@@ -319,7 +310,7 @@ static void apci1032_detach(struct comedi_device *dev)
 
        if (devpriv) {
                if (dev->iobase)
-                       i_ADDI_Reset(dev);
+                       i_APCI1032_Reset(dev);
                if (dev->irq)
                        free_irq(dev->irq, dev);
                if (devpriv->dw_AiBase)