Skip to content

Commit

Permalink
Staging: comedi: hwdrv_apci1032.c: Checkpatch cleanup
Browse files Browse the repository at this point in the history
ERROR: do not initialise externals to 0 or NULL
+unsigned int ui_InterruptStatus = 0;

WARNING: braces {} are not necessary for single statement blocks
+		else {
+			outl(0x6, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ);
+		}		/* else if(data[1] == ADDIDATA_OR) */

WARNING: braces {} are not necessary for single statement blocks
+		if (data[1] == 1) {
+			*data = ui_InterruptStatus;
+		}		/* if(data[1]==1) */

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Andrea Gelmini authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent a9ecb5b commit 882e123
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ You should also find the complete GPL in the COPYING file accompanying this sour
#include "hwdrv_apci1032.h"
#include <linux/delay.h>
/* Global variables */
unsigned int ui_InterruptStatus = 0;
unsigned int ui_InterruptStatus;

/*
+----------------------------------------------------------------------------+
Expand Down Expand Up @@ -108,9 +108,9 @@ int i_APCI1032_ConfigDigitalInput(struct comedi_device *dev, struct comedi_subde
ui_TmpValue =
inl(devpriv->iobase + APCI1032_DIGITAL_IP_IRQ);
} /* if (data[1] == ADDIDATA_OR) */
else {
else
outl(0x6, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ);
} /* else if(data[1] == ADDIDATA_OR) */
/* else if(data[1] == ADDIDATA_OR) */
} /* if( data[0] == ADDIDATA_ENABLE) */
else {
ul_Command1 = ul_Command1 & 0xFFFF0000;
Expand Down Expand Up @@ -221,9 +221,9 @@ int i_APCI1032_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_sub
} /* switch(ui_NoOfChannels) */
} /* if(data[1]==0) */
else {
if (data[1] == 1) {
if (data[1] == 1)
*data = ui_InterruptStatus;
} /* if(data[1]==1) */
/* if(data[1]==1) */
} /* else if(data[1]==0) */
return insn->n;
}
Expand Down

0 comments on commit 882e123

Please sign in to comment.