]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: ni_stc.h: tidy up G_HW_Save_Register
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 1 May 2015 21:59:43 +0000 (14:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 May 2015 17:05:15 +0000 (19:05 +0200)
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@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_mio_common.c
drivers/staging/comedi/drivers/ni_stc.h

index ea30689818d540ffd23e2e9cacaf7edeae37e674..f0f449c5dce59b05843e5b41b4506651d680344e 100644 (file)
@@ -416,8 +416,8 @@ static const struct mio_regmap m_series_stc_read_regmap[] = {
        [NISTC_AI_STATUS2_REG]          = { 0, 0 }, /* Unknown */
        [NISTC_AO_STATUS2_REG]          = { 0x10c, 2 },
        [NISTC_DIO_IN_REG]              = { 0, 0 }, /* Unknown */
-       [G_HW_Save_Register(0)]         = { 0x110, 4 },
-       [G_HW_Save_Register(1)]         = { 0x114, 4 },
+       [NISTC_G0_HW_SAVE_REG]          = { 0x110, 4 },
+       [NISTC_G1_HW_SAVE_REG]          = { 0x114, 4 },
        [G_Save_Register(0)]            = { 0x118, 4 },
        [G_Save_Register(1)]            = { 0x11c, 4 },
        [AO_UI_Save_Registers]          = { 0x120, 4 },
@@ -3706,8 +3706,8 @@ static const struct mio_regmap ni_gpct_to_stc_regmap[] = {
        [NITIO_G1_AUTO_INC]     = { NISTC_G1_AUTOINC_REG, 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_HW_SAVE]      = { NISTC_G0_HW_SAVE_REG, 4 },
+       [NITIO_G1_HW_SAVE]      = { NISTC_G1_HW_SAVE_REG, 4 },
        [NITIO_G0_SW_SAVE]      = { G_Save_Register(0), 4 },
        [NITIO_G1_SW_SAVE]      = { G_Save_Register(1), 4 },
        [NITIO_G0_MODE]         = { NISTC_G0_MODE_REG, 2 },
index 5be6a9505ab49d091316ed51f7df6ad681b232a0..0b4dcc475012f0f4f35882879f23ba2799ebc8c5 100644 (file)
 
 #define NISTC_DIO_IN_REG               7
 
+#define NISTC_G0_HW_SAVE_REG           8
+#define NISTC_G1_HW_SAVE_REG           10
+
 #define AI_SI_Save_Registers           64
 #define AI_SC_Save_Registers           66
 
@@ -556,9 +559,6 @@ enum Joint_Status_2_Bits {
 #define AO_BC_Save_Registers           18
 #define AO_UC_Save_Registers           20
 
-#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)
 #define G_Save_Register(a)             (12+(a)*2)
 #define G_Save_Register_High(a)                (12+(a)*2)
 #define G_Save_Register_Low(a)         (13+(a)*2)