[PATCH 2/4] staging: comedi: hwdrv_apci1500: remove commented out code

2014-08-31 Thread Chase Southwood
Signed-off-by: Chase Southwood 
Cc: Ian Abbott 
Cc: H Hartley Sweeten 
---
 .../comedi/drivers/addi-data/hwdrv_apci1500.c  | 249 ++---
 1 file changed, 123 insertions(+), 126 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c 
b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
index 3cc827e..031882e 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
@@ -172,17 +172,17 @@ static int apci1500_di_config(struct comedi_device *dev,
 
if (data[0] == 1) {
i_MaxChannel = 8;
-   }   /*  if (data[0] == 1) */
+   }
else {
if (data[0] == 2) {
i_MaxChannel = 6;
-   }   /*  if(data[0]==2) */
+   }
else {
dev_warn(dev->hw_dev,
"The specified port event does not exist\n");
return -EINVAL;
-   }   /* else if(data[0]==2) */
-   }   /* else  if (data[0] == 1) */
+   }
+   }
switch (data[1]) {
case 0:
data[1] = APCI1500_AND;
@@ -197,7 +197,7 @@ static int apci1500_di_config(struct comedi_device *dev,
dev_warn(dev->hw_dev,
"The specified interrupt logic does not exist\n");
return -EINVAL;
-   }   /* switch(data[1]); */
+   }
 
i_Logic = data[1];
for (i_Count = i_MaxChannel, i = 0; i_Count > 0; i_Count--, i++) {
@@ -242,8 +242,8 @@ static int apci1500_di_config(struct comedi_device *dev,
dev_warn(dev->hw_dev,
"The option indicated in the event mask does 
not exist\n");
return -EINVAL;
-   }   /*  switch(i_EventMask) */
-   }   /* for (i_Count = i_MaxChannel; i_Count 
>0;i_Count --) */
+   }
+   }
 
if (data[0] == 1) {
/* Test the interrupt logic */
@@ -259,7 +259,7 @@ static int apci1500_di_config(struct comedi_device *dev,
dev_warn(dev->hw_dev,
"Transition error on an OR PRIORITY 
logic\n");
return -EINVAL;
-   }   /*  if (data[1]== APCI1500_OR_PRIORITY && 
i_PatternTransition != 0) */
+   }
 
/* Tests if more than one transition */
/* was declared for an AND logic */
@@ -271,14 +271,14 @@ static int apci1500_di_config(struct comedi_device *dev,
((i_PatternTransition >>
i_Count) & 0x1);
 
-   }   /* for (i_Count = 0; i_Count < 8; 
i_Count++) */
+   }
 
if (i_PatternTransitionCount > 1) {
dev_warn(dev->hw_dev,
"Transition error on an AND 
logic\n");
return -EINVAL;
-   }   /*  if (i_PatternTransitionCount > 1) */
-   }   /*  if (data[1]== APCI1500_AND) */
+   }
+   }
 
/* Selects the APCI1500_RW_MASTER_CONFIGURATION_CONTROL 
register */
outb(APCI1500_RW_MASTER_CONFIGURATION_CONTROL,
@@ -347,13 +347,13 @@ static int apci1500_di_config(struct comedi_device *dev,
devpriv->iobase +
APCI1500_Z8536_CONTROL_REGISTER);
 
-   }   /*  
if(data[1]==APCI1500_AND||data[1]==APCI1500_OR||data[1]==APCI1500_OR_PRIORITY) 
*/
+   }
else {
dev_warn(dev->hw_dev,
"The choice for interrupt logic does not 
exist\n");
return -EINVAL;
-   }   /*  else }// 
if(data[1]==APCI1500_AND||data[1]==APCI1500_OR||data[1]==APCI1500_OR_PRIORITY) 
*/
-   }   /*if (data[0]== 1) */
+   }
+   }
 
/* Test if event setting for port 2 */
 
@@ -448,13 +448,13 @@ static int apci1500_di_config(struct comedi_device *dev,
outb(0xF4,
devpriv->iobase +
APCI1500_Z8536_CONTROL_REGISTER);
-   }   /*   if (data[1] == APCI1500_OR) */
+   }
else {
dev_warn(dev->hw_dev,
"The choice for interrupt logic does not 
exist\n");
 

[PATCH 2/4] staging: comedi: hwdrv_apci1500: remove commented out code

2014-08-31 Thread Chase Southwood
Signed-off-by: Chase Southwood chase.southw...@gmail.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: H Hartley Sweeten hswee...@visionengravers.com
---
 .../comedi/drivers/addi-data/hwdrv_apci1500.c  | 249 ++---
 1 file changed, 123 insertions(+), 126 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c 
b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
index 3cc827e..031882e 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
@@ -172,17 +172,17 @@ static int apci1500_di_config(struct comedi_device *dev,
 
if (data[0] == 1) {
i_MaxChannel = 8;
-   }   /*  if (data[0] == 1) */
+   }
else {
if (data[0] == 2) {
i_MaxChannel = 6;
-   }   /*  if(data[0]==2) */
+   }
else {
dev_warn(dev-hw_dev,
The specified port event does not exist\n);
return -EINVAL;
-   }   /* else if(data[0]==2) */
-   }   /* else  if (data[0] == 1) */
+   }
+   }
switch (data[1]) {
case 0:
data[1] = APCI1500_AND;
@@ -197,7 +197,7 @@ static int apci1500_di_config(struct comedi_device *dev,
dev_warn(dev-hw_dev,
The specified interrupt logic does not exist\n);
return -EINVAL;
-   }   /* switch(data[1]); */
+   }
 
i_Logic = data[1];
for (i_Count = i_MaxChannel, i = 0; i_Count  0; i_Count--, i++) {
@@ -242,8 +242,8 @@ static int apci1500_di_config(struct comedi_device *dev,
dev_warn(dev-hw_dev,
The option indicated in the event mask does 
not exist\n);
return -EINVAL;
-   }   /*  switch(i_EventMask) */
-   }   /* for (i_Count = i_MaxChannel; i_Count 
0;i_Count --) */
+   }
+   }
 
if (data[0] == 1) {
/* Test the interrupt logic */
@@ -259,7 +259,7 @@ static int apci1500_di_config(struct comedi_device *dev,
dev_warn(dev-hw_dev,
Transition error on an OR PRIORITY 
logic\n);
return -EINVAL;
-   }   /*  if (data[1]== APCI1500_OR_PRIORITY  
i_PatternTransition != 0) */
+   }
 
/* Tests if more than one transition */
/* was declared for an AND logic */
@@ -271,14 +271,14 @@ static int apci1500_di_config(struct comedi_device *dev,
((i_PatternTransition 
i_Count)  0x1);
 
-   }   /* for (i_Count = 0; i_Count  8; 
i_Count++) */
+   }
 
if (i_PatternTransitionCount  1) {
dev_warn(dev-hw_dev,
Transition error on an AND 
logic\n);
return -EINVAL;
-   }   /*  if (i_PatternTransitionCount  1) */
-   }   /*  if (data[1]== APCI1500_AND) */
+   }
+   }
 
/* Selects the APCI1500_RW_MASTER_CONFIGURATION_CONTROL 
register */
outb(APCI1500_RW_MASTER_CONFIGURATION_CONTROL,
@@ -347,13 +347,13 @@ static int apci1500_di_config(struct comedi_device *dev,
devpriv-iobase +
APCI1500_Z8536_CONTROL_REGISTER);
 
-   }   /*  
if(data[1]==APCI1500_AND||data[1]==APCI1500_OR||data[1]==APCI1500_OR_PRIORITY) 
*/
+   }
else {
dev_warn(dev-hw_dev,
The choice for interrupt logic does not 
exist\n);
return -EINVAL;
-   }   /*  else }// 
if(data[1]==APCI1500_AND||data[1]==APCI1500_OR||data[1]==APCI1500_OR_PRIORITY) 
*/
-   }   /*if (data[0]== 1) */
+   }
+   }
 
/* Test if event setting for port 2 */
 
@@ -448,13 +448,13 @@ static int apci1500_di_config(struct comedi_device *dev,
outb(0xF4,
devpriv-iobase +
APCI1500_Z8536_CONTROL_REGISTER);
-   }   /*   if (data[1] == APCI1500_OR) */
+   }
else {
dev_warn(dev-hw_dev,
The choice for interrupt