]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging: comedi: APCI1710_82x54: remove forward declarations
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 31 Oct 2012 00:01:13 +0000 (17:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 22:15:55 +0000 (15:15 -0700)
This source file is #include'd when building the addi_apci_1710 driver.
All the functions in this file are actually static and should not be
exported to the kernel.

Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.

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/APCI1710_82x54.c
drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.h

index 8656d0ef2c8df56a83449a892a9575d86bd3c034..64d286d3cd915cf157ed3fd940d2d9fa5d917ae4 100644 (file)
@@ -218,9 +218,10 @@ int i_InsnConfig_InitTimer(struct comedi_device *dev,struct comedi_subdevice *s,
 |                    -9: Selection from hardware gate level is wrong         |
 +----------------------------------------------------------------------------+
 */
-
-int i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev, struct comedi_subdevice *s,
-                                  struct comedi_insn *insn, unsigned int *data)
+static int i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev,
+                                         struct comedi_subdevice *s,
+                                         struct comedi_insn *insn,
+                                         unsigned int *data)
 {
        struct addi_private *devpriv = dev->private;
        int i_ReturnValue = 0;
@@ -447,10 +448,10 @@ i_ReturnValue=insn->n;
 |                        See function "i_APCI1710_SetBoardIntRoutineX"       |
 +----------------------------------------------------------------------------+
 */
-
-int i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,
-                                          struct comedi_subdevice *s,
-                                          struct comedi_insn *insn, unsigned int *data)
+static int i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,
+                                                struct comedi_subdevice *s,
+                                                struct comedi_insn *insn,
+                                                unsigned int *data)
 {
        struct addi_private *devpriv = dev->private;
        int i_ReturnValue = 0;
@@ -590,9 +591,10 @@ int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev,struct comedi_sub
 |                        "i_APCI1710_InitTimer"                              |
 +----------------------------------------------------------------------------+
 */
-
-int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_subdevice *s,
-                                    struct comedi_insn *insn, unsigned int *data)
+static int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev,
+                                           struct comedi_subdevice *s,
+                                           struct comedi_insn *insn,
+                                           unsigned int *data)
 {
        struct addi_private *devpriv = dev->private;
        int i_ReturnValue = 0;
@@ -668,70 +670,6 @@ int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_su
        return i_ReturnValue;
 }
 
-/*
-+----------------------------------------------------------------------------+
-| Function Name     :INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev,
-struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)                   |
-+----------------------------------------------------------------------------+
-| Task              : Read write functions for Timer                                          |
-+----------------------------------------------------------------------------+
-| Input Parameters  :
-+----------------------------------------------------------------------------+
-| Output Parameters : -                                                      |
-+----------------------------------------------------------------------------+
-| Return Value      :
-+----------------------------------------------------------------------------+
-*/
-
-int i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice *s,
-                            struct comedi_insn *insn, unsigned int *data)
-{
-       unsigned char b_BitsType;
-       int i_ReturnValue = 0;
-       b_BitsType = data[0];
-
-       printk("\n82X54");
-
-       switch (b_BitsType) {
-       case APCI1710_TIMER_READVALUE:
-               i_ReturnValue = i_APCI1710_ReadTimerValue(dev,
-                                                         (unsigned char)CR_AREF(insn->chanspec),
-                                                         (unsigned char)CR_CHAN(insn->chanspec),
-                                                         (unsigned int *) &data[0]);
-               break;
-
-       case APCI1710_TIMER_GETOUTPUTLEVEL:
-               i_ReturnValue = i_APCI1710_GetTimerOutputLevel(dev,
-                                                              (unsigned char)CR_AREF(insn->chanspec),
-                                                              (unsigned char)CR_CHAN(insn->chanspec),
-                                                              (unsigned char *) &data[0]);
-               break;
-
-       case APCI1710_TIMER_GETPROGRESSSTATUS:
-               i_ReturnValue = i_APCI1710_GetTimerProgressStatus(dev,
-                                                                 (unsigned char)CR_AREF(insn->chanspec),
-                                                                 (unsigned char)CR_CHAN(insn->chanspec),
-                                                                 (unsigned char *)&data[0]);
-               break;
-
-       case APCI1710_TIMER_WRITEVALUE:
-               i_ReturnValue = i_APCI1710_WriteTimerValue(dev,
-                                                          (unsigned char)CR_AREF(insn->chanspec),
-                                                          (unsigned char)CR_CHAN(insn->chanspec),
-                                                          (unsigned int)data[1]);
-
-               break;
-
-       default:
-               printk("Bits Config Parameter Wrong\n");
-               i_ReturnValue = -1;
-       }
-
-       if (i_ReturnValue >= 0)
-               i_ReturnValue = insn->n;
-       return i_ReturnValue;
-}
-
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_     i_APCI1710_ReadTimerValue                    |
@@ -761,10 +699,10 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice
 |                        "i_APCI1710_InitTimer"                              |
 +----------------------------------------------------------------------------+
 */
-
-int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
-                             unsigned char b_ModulNbr, unsigned char b_TimerNbr,
-                             unsigned int *pul_TimerValue)
+static int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
+                                    unsigned char b_ModulNbr,
+                                    unsigned char b_TimerNbr,
+                                    unsigned int *pul_TimerValue)
 {
        struct addi_private *devpriv = dev->private;
        int i_ReturnValue = 0;
@@ -850,10 +788,10 @@ int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
           |                        "i_APCI1710_InitTimer"                              |
           +----------------------------------------------------------------------------+
         */
-
-int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
-                                  unsigned char b_ModulNbr, unsigned char b_TimerNbr,
-                                  unsigned char *pb_OutputLevel)
+static int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
+                                         unsigned char b_ModulNbr,
+                                         unsigned char b_TimerNbr,
+                                         unsigned char *pb_OutputLevel)
 {
        struct addi_private *devpriv = dev->private;
        int i_ReturnValue = 0;
@@ -930,10 +868,10 @@ int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
 |                        "i_APCI1710_InitTimer"                              |
 +----------------------------------------------------------------------------+
 */
-
-int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
-                                     unsigned char b_ModulNbr, unsigned char b_TimerNbr,
-                                     unsigned char *pb_TimerStatus)
+static int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
+                                            unsigned char b_ModulNbr,
+                                            unsigned char b_TimerNbr,
+                                            unsigned char *pb_TimerStatus)
 {
        struct addi_private *devpriv = dev->private;
        int i_ReturnValue = 0;
@@ -1010,10 +948,10 @@ int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
 |                        "i_APCI1710_InitTimer"                              |
 +----------------------------------------------------------------------------+
 */
-
-int i_APCI1710_WriteTimerValue(struct comedi_device *dev,
-                              unsigned char b_ModulNbr, unsigned char b_TimerNbr,
-                              unsigned int ul_WriteValue)
+static int i_APCI1710_WriteTimerValue(struct comedi_device *dev,
+                                     unsigned char b_ModulNbr,
+                                     unsigned char b_TimerNbr,
+                                     unsigned int ul_WriteValue)
 {
        struct addi_private *devpriv = dev->private;
        int i_ReturnValue = 0;
@@ -1051,3 +989,68 @@ int i_APCI1710_WriteTimerValue(struct comedi_device *dev,
 
        return i_ReturnValue;
 }
+
+/*
++----------------------------------------------------------------------------+
+| Function Name     :INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev,
+struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)                   |
++----------------------------------------------------------------------------+
+| Task              : Read write functions for Timer                                          |
++----------------------------------------------------------------------------+
+| Input Parameters  :
++----------------------------------------------------------------------------+
+| Output Parameters : -                                                      |
++----------------------------------------------------------------------------+
+| Return Value      :
++----------------------------------------------------------------------------+
+*/
+static int i_APCI1710_InsnBitsTimer(struct comedi_device *dev,
+                                   struct comedi_subdevice *s,
+                                   struct comedi_insn *insn,
+                                   unsigned int *data)
+{
+       unsigned char b_BitsType;
+       int i_ReturnValue = 0;
+       b_BitsType = data[0];
+
+       printk("\n82X54");
+
+       switch (b_BitsType) {
+       case APCI1710_TIMER_READVALUE:
+               i_ReturnValue = i_APCI1710_ReadTimerValue(dev,
+                                                         (unsigned char)CR_AREF(insn->chanspec),
+                                                         (unsigned char)CR_CHAN(insn->chanspec),
+                                                         (unsigned int *) &data[0]);
+               break;
+
+       case APCI1710_TIMER_GETOUTPUTLEVEL:
+               i_ReturnValue = i_APCI1710_GetTimerOutputLevel(dev,
+                                                              (unsigned char)CR_AREF(insn->chanspec),
+                                                              (unsigned char)CR_CHAN(insn->chanspec),
+                                                              (unsigned char *) &data[0]);
+               break;
+
+       case APCI1710_TIMER_GETPROGRESSSTATUS:
+               i_ReturnValue = i_APCI1710_GetTimerProgressStatus(dev,
+                                                                 (unsigned char)CR_AREF(insn->chanspec),
+                                                                 (unsigned char)CR_CHAN(insn->chanspec),
+                                                                 (unsigned char *)&data[0]);
+               break;
+
+       case APCI1710_TIMER_WRITEVALUE:
+               i_ReturnValue = i_APCI1710_WriteTimerValue(dev,
+                                                          (unsigned char)CR_AREF(insn->chanspec),
+                                                          (unsigned char)CR_CHAN(insn->chanspec),
+                                                          (unsigned int)data[1]);
+
+               break;
+
+       default:
+               printk("Bits Config Parameter Wrong\n");
+               i_ReturnValue = -1;
+       }
+
+       if (i_ReturnValue >= 0)
+               i_ReturnValue = insn->n;
+       return i_ReturnValue;
+}
index 81346dbc35f20d38c7d9e3c5309dc15986353c1a..85a70f32362d8f3ccd85d850105c9132172a4351 100644 (file)
 #define APCI1710_10MHZ 10
 #endif
 /* END JK 27.10.03 : Add the possibility to use a 40 Mhz quartz */
-
-/*
- * 82X54 TIMER INISIALISATION FUNCTION
- */
-int i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev, struct comedi_subdevice *s,
-                                  struct comedi_insn *insn, unsigned int *data);
-
-int i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,
-                                          struct comedi_subdevice *s,
-                                          struct comedi_insn *insn, unsigned int *data);
-
-/*
- * 82X54 READ FUNCTION
- */
-int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_subdevice *s,
-                                    struct comedi_insn *insn, unsigned int *data);
-
-int i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice *s,
-                            struct comedi_insn *insn, unsigned int *data);
-
-/*
- * 82X54 READ & WRITE FUNCTION
- */
-int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
-                             unsigned char b_ModulNbr, unsigned char b_TimerNbr,
-                             unsigned int *pul_TimerValue);
-
-int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
-                                  unsigned char b_ModulNbr, unsigned char b_TimerNbr,
-                                  unsigned char *pb_OutputLevel);
-
-int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
-                                     unsigned char b_ModulNbr, unsigned char b_TimerNbr,
-                                     unsigned char *pb_TimerStatus);
-
-/*
- * 82X54 WRITE FUNCTION
- */
-int i_APCI1710_WriteTimerValue(struct comedi_device *dev,
-                              unsigned char b_ModulNbr, unsigned char b_TimerNbr,
-                              unsigned int ul_WriteValue);