summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/ni_tio_internal.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-07-28 10:26:54 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-30 16:51:00 -0700
commitdc613766b70db497dd3db22b1b23d19fc753497d (patch)
treea62d7ab49e56f71bea9ea93130046bdf5600b661 /drivers/staging/comedi/drivers/ni_tio_internal.h
parent24a675c5130198fcf354325f108b4a62aa7575a5 (diff)
staging: comedi: ni_tio: tidy up Gi_Reset_Bit
Convert this inline CamelCase function into a define. For aesthetics, move the new define so it is associated with the register define. 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>
Diffstat (limited to 'drivers/staging/comedi/drivers/ni_tio_internal.h')
-rw-r--r--drivers/staging/comedi/drivers/ni_tio_internal.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/ni_tio_internal.h b/drivers/staging/comedi/drivers/ni_tio_internal.h
index 37fde62b0d6e..ea1c9fb269af 100644
--- a/drivers/staging/comedi/drivers/ni_tio_internal.h
+++ b/drivers/staging/comedi/drivers/ni_tio_internal.h
@@ -126,6 +126,7 @@
#define GI_TC_ERROR(x) (((x) % 2) ? (1 << 13) : (1 << 12))
#define GI_GATE_ERROR(x) (((x) % 2) ? (1 << 15) : (1 << 14))
#define NITIO_RESET_REG(x) (NITIO_G01_RESET + ((x) / 2))
+#define GI_RESET(x) (1 << (2 + ((x) % 2)))
#define NITIO_STATUS1_REG(x) (NITIO_G01_STATUS1 + ((x) / 2))
#define NITIO_STATUS2_REG(x) (NITIO_G01_STATUS2 + ((x) / 2))
#define NITIO_DMA_CFG_REG(x) (NITIO_G0_DMA_CFG + (x))
@@ -135,12 +136,6 @@
#define NITIO_STATUS_REG(x) (NITIO_G0_STATUS + (x))
#define NITIO_INT_ENA_REG(x) (NITIO_G0_INT_ENA + (x))
-/* joint reset register bits */
-static inline unsigned Gi_Reset_Bit(unsigned counter_index)
-{
- return 0x1 << (2 + (counter_index % 2));
-}
-
enum Gxx_Joint_Status2_Bits {
G0_Output_Bit = 0x1,
G1_Output_Bit = 0x2,