[PATCH 10/31] staging: comedi: pcl711: tidy up the register map defines

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

 



Add some whitespace to the register map defines to make the code
easier to read.

For aesthetics, convert all the values to hex. This is more common
in comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/pcl711.c | 41 ++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcl711.c b/drivers/staging/comedi/drivers/pcl711.c
index c606052..9b439cc 100644
--- a/drivers/staging/comedi/drivers/pcl711.c
+++ b/drivers/staging/comedi/drivers/pcl711.c
@@ -62,25 +62,28 @@ supported.
 #include "comedi_fc.h"
 #include "8253.h"
 
-#define PCL711_CTR0 0
-#define PCL711_CTR1 1
-#define PCL711_CTR2 2
-#define PCL711_CTRCTL 3
-#define PCL711_AD_LO 4
-#define PCL711_DA0_LO 4
-#define PCL711_AD_HI 5
-#define PCL711_DA0_HI 5
-#define PCL711_DI_LO 6
-#define PCL711_DA1_LO 6
-#define PCL711_DI_HI 7
-#define PCL711_DA1_HI 7
-#define PCL711_CLRINTR 8
-#define PCL711_GAIN 9
-#define PCL711_MUX 10
-#define PCL711_MODE 11
-#define PCL711_SOFTTRIG 12
-#define PCL711_DO_LO 13
-#define PCL711_DO_HI 14
+/*
+ * I/O port register map
+ */
+#define PCL711_CTR0		0x00
+#define PCL711_CTR1		0x01
+#define PCL711_CTR2		0x02
+#define PCL711_CTRCTL		0x03
+#define PCL711_AD_LO		0x04
+#define PCL711_DA0_LO		0x04
+#define PCL711_AD_HI		0x05
+#define PCL711_DA0_HI		0x05
+#define PCL711_DI_LO		0x06
+#define PCL711_DA1_LO		0x06
+#define PCL711_DI_HI		0x07
+#define PCL711_DA1_HI		0x07
+#define PCL711_CLRINTR		0x08
+#define PCL711_GAIN		0x09
+#define PCL711_MUX		0x0a
+#define PCL711_MODE		0x0b
+#define PCL711_SOFTTRIG		0x0c
+#define PCL711_DO_LO		0x0d
+#define PCL711_DO_HI		0x0e
 
 static const struct comedi_lrange range_pcl711b_ai = {
 	5, {
-- 
1.8.3.2

_______________________________________________
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