]> Pileus Git - ~andy/linux/commitdiff
staging: comedi: addi_apci_1032: cleanup i_APCI1032_ReadMoreDigitalInput()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 5 Nov 2012 21:40:02 +0000 (14:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Nov 2012 08:30:57 +0000 (09:30 +0100)
Move this function from hwdrv_apci1032.c.

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

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 be3577687b503ca22a64d9205dde1d971ceaa81b..3e3c229dba9a465f344e224143a6583fc7b627d5 100644 (file)
@@ -136,36 +136,6 @@ static int i_APCI1032_ConfigDigitalInput(struct comedi_device *dev,
        return insn->n;
 }
 
-/*
-+----------------------------------------------------------------------------+
-| Function   Name   : int i_APCI1032_ReadMoreDigitalInput                    |
-|                        (struct comedi_device *dev,struct comedi_subdevice *s,               |
-|                     struct comedi_insn *insn,unsigned int *data)                      |
-+----------------------------------------------------------------------------+
-| Task              : Return the status of the Requested digital inputs      |
-+----------------------------------------------------------------------------+
-| Input Parameters  : struct comedi_device *dev      : Driver handle                |
-|                     unsigned int ui_NoOfChannels    : No Of Channels To be Read    |
-|                      unsigned int *data             : Data Pointer to read status  |
-+----------------------------------------------------------------------------+
-| Output Parameters :  --                                                                                                       |
-+----------------------------------------------------------------------------+
-| Return Value      : TRUE  : No error occur                                 |
-|                          : FALSE : Error occur. Return the error          |
-|                                                                               |
-+----------------------------------------------------------------------------+
-*/
-
-static int i_APCI1032_ReadMoreDigitalInput(struct comedi_device *dev,
-                                          struct comedi_subdevice *s,
-                                          struct comedi_insn *insn,
-                                          unsigned int *data)
-{
-       data[1] = inl(dev->iobase + APCI1032_DI_REG);
-
-       return insn->n;
-}
-
 /*
 +----------------------------------------------------------------------------+
 | Function   Name   : static void v_APCI1032_Interrupt                                      |
index 77e78df65b897ea7c8e89a9888c42c920c0ddb6d..9e60d1f30e6d525b45467b97a773d92ad2a32d14 100644 (file)
@@ -12,6 +12,16 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
        return IRQ_RETVAL(1);
 }
 
+static int apci1032_di_insn_bits(struct comedi_device *dev,
+                                struct comedi_subdevice *s,
+                                struct comedi_insn *insn,
+                                unsigned int *data)
+{
+       data[1] = inl(dev->iobase + APCI1032_DI_REG);
+
+       return insn->n;
+}
+
 static int apci1032_reset(struct comedi_device *dev)
 {
        /* disable the interrupts */
@@ -74,7 +84,7 @@ static int apci1032_attach_pci(struct comedi_device *dev,
        s->len_chanlist = 32;
        s->range_table  = &range_digital;
        s->insn_config  = i_APCI1032_ConfigDigitalInput;
-       s->insn_bits    = i_APCI1032_ReadMoreDigitalInput;
+       s->insn_bits    = apci1032_di_insn_bits;
 
        /*  Allocate and Initialise DO Subdevice Structures */
        s = &dev->subdevices[3];