[PATCH 033/107] staging: comedi: ni_stc.h: tidy up G_Command_Register

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

 



Rename the CamelCase and define the G0 and G1 registers to add clarity
to the mio_regmap tables.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/ni_mio_common.c | 8 ++++----
 drivers/staging/comedi/drivers/ni_stc.h        | 4 +++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index 45d16d7..0ac17c8 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -318,8 +318,8 @@ static const struct mio_regmap m_series_stc_write_regmap[] = {
 	[NISTC_INTB_ACK_REG]		= { 0x106, 2 },
 	[NISTC_AI_CMD2_REG]		= { 0x108, 2 },
 	[NISTC_AO_CMD2_REG]		= { 0x10a, 2 },
-	[G_Command_Register(0)]		= { 0x10c, 2 },
-	[G_Command_Register(1)]		= { 0x10e, 2 },
+	[NISTC_G0_CMD_REG]		= { 0x10c, 2 },
+	[NISTC_G1_CMD_REG]		= { 0x10e, 2 },
 	[AI_Command_1_Register]		= { 0x110, 2 },
 	[AO_Command_1_Register]		= { 0x112, 2 },
 	/*
@@ -3720,8 +3720,8 @@ static void init_ao_67xx(struct comedi_device *dev, struct comedi_subdevice *s)
 static const struct mio_regmap ni_gpct_to_stc_regmap[] = {
 	[NITIO_G0_AUTO_INC]	= { G_Autoincrement_Register(0), 2 },
 	[NITIO_G1_AUTO_INC]	= { G_Autoincrement_Register(1), 2 },
-	[NITIO_G0_CMD]		= { G_Command_Register(0), 2 },
-	[NITIO_G1_CMD]		= { G_Command_Register(1), 2 },
+	[NITIO_G0_CMD]		= { NISTC_G0_CMD_REG, 2 },
+	[NITIO_G1_CMD]		= { NISTC_G1_CMD_REG, 2 },
 	[NITIO_G0_HW_SAVE]	= { G_HW_Save_Register(0), 4 },
 	[NITIO_G1_HW_SAVE]	= { G_HW_Save_Register(1), 4 },
 	[NITIO_G0_SW_SAVE]	= { G_Save_Register(0), 4 },
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index 2a54864..7f88dd4 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -126,6 +126,9 @@
 #define NISTC_AO_CMD2_UPDATE2_PULSE	BIT(1)
 #define NISTC_AO_CMD2_START1_PULSE	BIT(0)
 
+#define NISTC_G0_CMD_REG		6
+#define NISTC_G1_CMD_REG		7
+
 #define AI_Status_1_Register		2
 #define Interrupt_A_St				0x8000
 #define AI_FIFO_Full_St				0x4000
@@ -599,7 +602,6 @@ static unsigned AO_UPDATE_Output_Select(enum ao_update_output_selection
 #define AI_External_Gate_Select(a)		((a) & 0x1f)
 
 #define G_Autoincrement_Register(a)	(68+(a))
-#define G_Command_Register(a)		(6+(a))
 #define G_HW_Save_Register(a)		(8+(a)*2)
 #define G_HW_Save_Register_High(a)	(8+(a)*2)
 #define G_HW_Save_Register_Low(a)	(9+(a)*2)
-- 
2.3.0

_______________________________________________
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