staging: comedi: addi_common.h: remove ADDIDATA_{EN, DIS}ABLE defines
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 29 May 2014 17:30:03 +0000 (10:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jun 2014 21:39:38 +0000 (14:39 -0700)
These defines don't add any additional clarity to the addi_data drivers.
Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi-data/addi_common.h
drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c

index 289083153ec680064829e214c809058b80f39e76..1a0bafcf983f91757e59e96176a2bcdd38026f98 100644 (file)
 #define ADDIDATA_93C76         "93C76"
 #define ADDIDATA_S5920         "S5920"
 
-/* ADDIDATA Enable Disable */
-#define ADDIDATA_ENABLE                1
-#define ADDIDATA_DISABLE       0
-
-/* Structures */
-
-/* structure for the boardtype */
 struct addi_board {
        const char *pc_DriverName;      /*  driver name */
        int i_IorangeBase1;
index 28450f65a13449f93c5875571eefdcf4809344b3..cad33f1a04fe44bd982f03ce109c873c219472f7 100644 (file)
@@ -177,8 +177,7 @@ static int apci035_timer_config(struct comedi_device *dev,
 
        /* Disable the hardware trigger */
        ui_Command = ui_Command & 0xFFFFF89FUL;
-       if (data[4] == ADDIDATA_ENABLE) {
-
+       if (data[4] == 1) {
                /* Set the hardware trigger level */
                ui_Command = ui_Command | (data[5] << 5);
        }
@@ -188,8 +187,7 @@ static int apci035_timer_config(struct comedi_device *dev,
 
        /* Disable the hardware gate */
        ui_Command = ui_Command & 0xFFFFF87FUL;
-       if (data[6] == ADDIDATA_ENABLE) {
-
+       if (data[6] == 1) {
                /* Set the hardware gate level */
                ui_Command = ui_Command | (data[7] << 7);
        }
@@ -203,8 +201,7 @@ static int apci035_timer_config(struct comedi_device *dev,
        /* Set the hardware output level */
        ui_Command = ui_Command | (data[8] << 2);
        outl(ui_Command, devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
-       if (data[9] == ADDIDATA_ENABLE) {
-
+       if (data[9] == 1) {
                /* Set the reload value */
                outl(data[11],
                        devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 24);
index 0ba5385226ae69486e8f1ff055683ce6f59eed56..7fa4346f61843bcdce41868b83d9949a2b6375d9 100644 (file)
@@ -111,7 +111,7 @@ static int apci1564_di_config(struct comedi_device *dev,
        devpriv->tsk_Current = current;
 
        /* Set the digital input logic */
-       if (data[0] == ADDIDATA_ENABLE) {
+       if (data[0] == 1) {
                data[2] = data[2] << 4;
                data[3] = data[3] << 4;
                outl(data[2], devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE1_REG);
@@ -150,16 +150,16 @@ static int apci1564_do_config(struct comedi_device *dev,
        }
 
        if (data[0])
-               devpriv->b_OutputMemoryStatus = ADDIDATA_ENABLE;
+               devpriv->b_OutputMemoryStatus = 1;
        else
-               devpriv->b_OutputMemoryStatus = ADDIDATA_DISABLE;
+               devpriv->b_OutputMemoryStatus = 0;
 
-       if (data[1] == ADDIDATA_ENABLE)
+       if (data[1] == 1)
                ul_Command = ul_Command | 0x1;
        else
                ul_Command = ul_Command & 0xFFFFFFFE;
 
-       if (data[2] == ADDIDATA_ENABLE)
+       if (data[2] == 1)
                ul_Command = ul_Command | 0x2;
        else
                ul_Command = ul_Command & 0xFFFFFFFD;
index f540394d17b0b4dbe35d866d7c0ff188681ef4a1..a3026a229e85e3e885c3e4cc05707b70c0daec8e 100644 (file)
@@ -689,17 +689,11 @@ static int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
 
        ui_CommandRegister = ui_ChannelNo | (ui_ChannelNo << 8) | 0x80000;
 
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-      /************************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /* Enable the interrupt */
-      /************************/
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
-       }                       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
+       }
 
   /******************************/
        /* Write the command register */
@@ -712,11 +706,8 @@ static int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
 
-  /*****************************/
        /*Test if interrupt is enable */
-  /*****************************/
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
          /*************************/
                        /*Read the EOC Status bit */
@@ -738,7 +729,7 @@ static int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
                        s_BoardInfos[dev->minor].i_Offset + 28);
                /* END JK 06.07.04: Management of sevrals boards */
 
-       }                       /*  if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -800,20 +791,11 @@ static int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev,
 
        ui_CommandRegister = 0;
 
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-
-      /**********************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /*Enable the interrupt */
-      /**********************/
-
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
-
-       }                       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
+       }
 
   /**********************/
        /*Start the conversion */
@@ -830,13 +812,8 @@ static int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev,
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
 
-  /*****************************/
        /*Test if interrupt is enable */
-  /*****************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
-
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
          /*******************/
                        /*Read the EOC flag */
@@ -856,7 +833,7 @@ static int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev,
                data[0] =
                        inl(devpriv->iobase +
                        s_BoardInfos[dev->minor].i_Offset + 28);
-       }                       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -915,20 +892,11 @@ static int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev,
 
        ui_CommandRegister = 0;
 
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-
-      /**********************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /*Enable the interrupt */
-      /**********************/
-
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
-
-       }                       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
+       }
 
   /**********************/
        /*Start the conversion */
@@ -945,13 +913,8 @@ static int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev,
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
 
-  /*****************************/
        /*Test if interrupt is enable */
-  /*****************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
-
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
 
          /*******************/
@@ -973,7 +936,7 @@ static int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev,
                        inl(devpriv->iobase +
                        s_BoardInfos[dev->minor].i_Offset + 28);
 
-       }                       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -1020,14 +983,9 @@ static int i_APCI3200_ReadCJCValue(struct comedi_device *dev,
        /*Initialise dw_CommandRegister */
   /*******************************/
        ui_CommandRegister = 0;
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-      /**********************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /*Enable the interrupt */
-      /**********************/
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
        }
 
@@ -1047,12 +1005,8 @@ static int i_APCI3200_ReadCJCValue(struct comedi_device *dev,
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
 
-  /*****************************/
        /*Test if interrupt is enable */
-  /*****************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
 
          /*******************/
@@ -1073,8 +1027,7 @@ static int i_APCI3200_ReadCJCValue(struct comedi_device *dev,
                data[0] =
                        inl(devpriv->iobase +
                        s_BoardInfos[dev->minor].i_Offset + 28);
-
-       }                       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -1128,17 +1081,10 @@ static int i_APCI3200_ReadCJCCalOffset(struct comedi_device *dev,
        /*Initialise ui_CommandRegister */
   /*******************************/
        ui_CommandRegister = 0;
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-      /**********************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /*Enable the interrupt */
-      /**********************/
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
-
        }
 
   /**********************/
@@ -1154,8 +1100,7 @@ static int i_APCI3200_ReadCJCCalOffset(struct comedi_device *dev,
        /* outl(ui_CommandRegister,devpriv->iobase+i_Offset + 8); */
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
          /*******************/
                        /*Read the EOC flag */
@@ -1172,7 +1117,7 @@ static int i_APCI3200_ReadCJCCalOffset(struct comedi_device *dev,
                data[0] =
                        inl(devpriv->iobase +
                        s_BoardInfos[dev->minor].i_Offset + 28);
-       }                       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -1224,14 +1169,9 @@ static int i_APCI3200_ReadCJCCalGain(struct comedi_device *dev,
        /*Initialise dw_CommandRegister */
   /*******************************/
        ui_CommandRegister = 0;
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-      /**********************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /*Enable the interrupt */
-      /**********************/
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
        }
   /**********************/
@@ -1247,8 +1187,7 @@ static int i_APCI3200_ReadCJCCalGain(struct comedi_device *dev,
        /* outl(ui_CommandRegister ,devpriv->iobase+i_Offset + 8); */
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
          /*******************/
                        /*Read the EOC flag */
@@ -1264,7 +1203,7 @@ static int i_APCI3200_ReadCJCCalGain(struct comedi_device *dev,
                data[0] =
                        inl(devpriv->iobase +
                        s_BoardInfos[dev->minor].i_Offset + 28);
-       }                       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -2136,8 +2075,7 @@ static int apci3200_ai_bits_test(struct comedi_device *dev,
                   i_ADDIDATAConversionTimeUnit= 1; */
                /* i_Temp= i_InterruptFlag ; */
                i_Temp = s_BoardInfos[dev->minor].i_InterruptFlag;
-               /* i_InterruptFlag = ADDIDATA_DISABLE; */
-               s_BoardInfos[dev->minor].i_InterruptFlag = ADDIDATA_DISABLE;
+               s_BoardInfos[dev->minor].i_InterruptFlag = 0;
                i_APCI3200_Read1AnalogInputChannel(dev, s, insn, data);
                /* if(i_AutoCalibration == FALSE) */
                if (s_BoardInfos[dev->minor].i_AutoCalibration == FALSE) {
@@ -2176,8 +2114,7 @@ static int apci3200_ai_bits_test(struct comedi_device *dev,
                   i_ADDIDATAConversionTimeUnit= 1; */
                /* i_Temp= i_InterruptFlag ; */
                i_Temp = s_BoardInfos[dev->minor].i_InterruptFlag;
-               /* i_InterruptFlag = ADDIDATA_DISABLE; */
-               s_BoardInfos[dev->minor].i_InterruptFlag = ADDIDATA_DISABLE;
+               s_BoardInfos[dev->minor].i_InterruptFlag = 0;
                i_APCI3200_Read1AnalogInputChannel(dev, s, insn, data);
                /* if(i_AutoCalibration == FALSE) */
                if (s_BoardInfos[dev->minor].i_AutoCalibration == FALSE) {