staging: comedi: addi_apci_1032: cleanup i_APCI1032_Reset()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 5 Nov 2012 21:39:12 +0000 (14:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Nov 2012 08:30:56 +0000 (09:30 +0100)
Move this function from hwdrv_apci1032.c.

Remove the unnecessary comment and rename the CamelCase function to
apci1032_reset().

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-data/hwdrv_apci1032.c
drivers/staging/comedi/drivers/addi_apci_1032.c

index 767392a9ac823875b727bc5016886578bf418638..337a46ef0cf803f2ead2d6a473b80992c8b4ce84 100644 (file)
@@ -278,31 +278,3 @@ static void v_APCI1032_Interrupt(int irq, void *d)
        outl(ui_Temp, dev->iobase + APCI1032_CTRL_REG);
        return;
 }
-
-/*
-+----------------------------------------------------------------------------+
-| Function   Name   : int i_APCI1032_Reset(struct comedi_device *dev)               |                                                       |
-+----------------------------------------------------------------------------+
-| Task              :resets all the registers                                |
-+----------------------------------------------------------------------------+
-| Input Parameters  : struct comedi_device *dev
-+----------------------------------------------------------------------------+
-| Output Parameters :  --                                                                                                       |
-+----------------------------------------------------------------------------+
-| Return Value      :                                                        |
-|                                                                               |
-+----------------------------------------------------------------------------+
-*/
-
-static int i_APCI1032_Reset(struct comedi_device *dev)
-{
-       /* disable the interrupts */
-       outl(0x0, dev->iobase + APCI1032_CTRL_REG);
-       /* Reset the interrupt status register */
-       inl(dev->iobase + APCI1032_STATUS_REG);
-       /* Disable the and/or interrupt */
-       outl(0x0, dev->iobase + APCI1032_MODE1_REG);
-       outl(0x0, dev->iobase + APCI1032_MODE2_REG);
-
-       return 0;
-}
index 45b254834f80f655cdb4c86b198de7b8d3acc87f..717e122ef94b10c8929b86a80300fb3782074632 100644 (file)
@@ -12,6 +12,19 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
        return IRQ_RETVAL(1);
 }
 
+static int apci1032_reset(struct comedi_device *dev)
+{
+       /* disable the interrupts */
+       outl(0x0, dev->iobase + APCI1032_CTRL_REG);
+       /* Reset the interrupt status register */
+       inl(dev->iobase + APCI1032_STATUS_REG);
+       /* Disable the and/or interrupt */
+       outl(0x0, dev->iobase + APCI1032_MODE1_REG);
+       outl(0x0, dev->iobase + APCI1032_MODE2_REG);
+
+       return 0;
+}
+
 static int apci1032_attach_pci(struct comedi_device *dev,
                               struct pci_dev *pcidev)
 {
@@ -80,7 +93,7 @@ static int apci1032_attach_pci(struct comedi_device *dev,
        s = &dev->subdevices[6];
        s->type = COMEDI_SUBD_UNUSED;
 
-       i_APCI1032_Reset(dev);
+       apci1032_reset(dev);
        return 0;
 }
 
@@ -91,7 +104,7 @@ static void apci1032_detach(struct comedi_device *dev)
 
        if (devpriv) {
                if (dev->iobase)
-                       i_APCI1032_Reset(dev);
+                       apci1032_reset(dev);
                if (dev->irq)
                        free_irq(dev->irq, dev);
        }
This page took 0.02607 seconds and 5 git commands to generate.