[PATCH] Staging: comedi: addi-data: style cleanups in hwdrv_apci1564.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch cleans up a few trivial style issues, including fixing crazy
indentation problems in the defines near the top of the file, removing a
couple of unneeded braces, and wrapping a couple of long comments onto new
lines to fix lines which were in excess of 80 characters.

Signed-off-by: Chase Southwood <chase.southwood@xxxxxxxxx>
---
Despite apply testing all of the patches in my series which cleaned
up all of these defines, and triple checking my tab space settings to
ensure they were correct, somehow after the set was merged, the
indentation STILL ended up messy.  This patch takes care of that
as well as a couple of other trivial style issues, and this will
serve as my last trivial cleanup patch for this file.  After this
I think that this is clean enough to start the more significant
work of trying to move this code out to addi_apci_1564.c

 .../comedi/drivers/addi-data/hwdrv_apci1564.c      | 54 +++++++++++-----------
 1 file changed, 28 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
index a31e115..28eaf34 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
@@ -72,30 +72,30 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
 /*
  * devpriv->i_IobaseAmcc Register Map
  */
-#define APCI1564_DI_REG						0x04
-#define APCI1564_DI_INT_MODE1_REG				0x08
-#define APCI1564_DI_INT_MODE2_REG				0x0c
-#define APCI1564_DI_INT_STATUS_REG				0x10
-#define APCI1564_DI_IRQ_REG					0x14
-#define APCI1564_DO_REG						0x18
-#define APCI1564_DO_INT_CTRL_REG				0x1c
-#define APCI1564_DO_INT_STATUS_REG				0x20
-#define APCI1564_DO_IRQ_REG					0x24
-#define APCI1564_WDOG_REG						0x28
-#define APCI1564_WDOG_RELOAD_REG				0x2c
-#define APCI1564_WDOG_TIMEBASE_REG				0x30
-#define APCI1564_WDOG_CTRL_REG					0x34
-#define APCI1564_WDOG_STATUS_REG				0x38
-#define APCI1564_WDOG_IRQ_REG					0x3c
+#define APCI1564_DI_REG					0x04
+#define APCI1564_DI_INT_MODE1_REG			0x08
+#define APCI1564_DI_INT_MODE2_REG			0x0c
+#define APCI1564_DI_INT_STATUS_REG			0x10
+#define APCI1564_DI_IRQ_REG				0x14
+#define APCI1564_DO_REG					0x18
+#define APCI1564_DO_INT_CTRL_REG			0x1c
+#define APCI1564_DO_INT_STATUS_REG			0x20
+#define APCI1564_DO_IRQ_REG				0x24
+#define APCI1564_WDOG_REG				0x28
+#define APCI1564_WDOG_RELOAD_REG			0x2c
+#define APCI1564_WDOG_TIMEBASE_REG			0x30
+#define APCI1564_WDOG_CTRL_REG				0x34
+#define APCI1564_WDOG_STATUS_REG			0x38
+#define APCI1564_WDOG_IRQ_REG				0x3c
 #define APCI1564_WDOG_WARN_TIMEVAL_REG			0x40
-#define APCI1564_WDOG_WARN_TIMEBASE_REG		0x44
-#define APCI1564_TIMER_REG						0x48
-#define APCI1564_TIMER_RELOAD_REG				0x4c
+#define APCI1564_WDOG_WARN_TIMEBASE_REG			0x44
+#define APCI1564_TIMER_REG				0x48
+#define APCI1564_TIMER_RELOAD_REG			0x4c
 #define APCI1564_TIMER_TIMEBASE_REG			0x50
 #define APCI1564_TIMER_CTRL_REG				0x54
-#define APCI1564_TIMER_STATUS_REG				0x58
-#define APCI1564_TIMER_IRQ_REG					0x5c
-#define APCI1564_TIMER_WARN_TIMEVAL_REG		0x60
+#define APCI1564_TIMER_STATUS_REG			0x58
+#define APCI1564_TIMER_IRQ_REG				0x5c
+#define APCI1564_TIMER_WARN_TIMEVAL_REG			0x60
 #define APCI1564_TIMER_WARN_TIMEBASE_REG		0x64
 
 /*
@@ -156,11 +156,10 @@ static int i_APCI1564_ConfigDigitalInput(struct comedi_device *dev,
 		data[3] = data[3] << 4;
 		outl(data[2], devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE1_REG);
 		outl(data[3], devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE2_REG);
-		if (data[1] == ADDIDATA_OR) {
+		if (data[1] == ADDIDATA_OR)
 			outl(0x4, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
-		} else {
+		else
 			outl(0x6, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
-		}
 	} else {
 		outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE1_REG);
 		outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE2_REG);
@@ -611,14 +610,17 @@ static void v_APCI1564_Interrupt(int irq, void *d)
 		ui_InterruptStatus_1564 =
 			inl(devpriv->i_IobaseAmcc + APCI1564_DI_INT_STATUS_REG);
 		ui_InterruptStatus_1564 = ui_InterruptStatus_1564 & 0X000FFFF0;
-		send_sig(SIGIO, devpriv->tsk_Current, 0);	/*  send signal to the sample */
+		/* send signal to the sample */
+		send_sig(SIGIO, devpriv->tsk_Current, 0);
 		/* enable the interrupt */
 		outl(ui_DI, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
 		return;
 	}
 
 	if (ui_DO == 1) {
-		/*  Check for Digital Output interrupt Type - 1: Vcc interrupt 2: CC interrupt. */
+		/* Check for Digital Output interrupt Type */
+		/* 1: VCC interrupt			   */
+		/* 2: CC interrupt			   */
 		ui_Type = inl(devpriv->i_IobaseAmcc + APCI1564_DO_INT_STATUS_REG) & 0x3;
 		/* Disable the  Interrupt */
 		outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DO_INT_CTRL_REG);
-- 
1.8.5.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux