diff options
author | H Hartley Sweeten <[email protected]> | 2014-07-24 10:14:46 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2014-07-27 11:16:47 -0700 |
commit | 390db7a30e4105db0a87a91918e08e060f1398a2 (patch) | |
tree | caa8a2c0c9c1a1e24cc5d598024e401309c22746 | |
parent | 7e3e7591631290617ca0a5bc9bd05aabf547d87d (diff) |
staging: comedi: ni_tio: tidy up enum ni_m_series_gate_select
These values are not used as an enum. For aesthetics, rename the
CamelCase values and convert them into defines.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/comedi/drivers/ni_tio.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c index 6ef64a6efea7..62a5cab53970 100644 --- a/drivers/staging/comedi/drivers/ni_tio.c +++ b/drivers/staging/comedi/drivers/ni_tio.c @@ -154,18 +154,17 @@ enum ni_660x_gate_select { #define NI_660X_PIN_GATE_SEL(x) (0x2 + (x)) #define NI_660X_RTSI_GATE_SEL(x) (0xb + (x)) -enum ni_m_series_gate_select { - NI_M_Series_Timestamp_Mux_Gate_Select = 0x0, - NI_M_Series_AI_START2_Gate_Select = 0x12, - NI_M_Series_PXI_Star_Trigger_Gate_Select = 0x13, - NI_M_Series_Next_Out_Gate_Select = 0x14, - NI_M_Series_AI_START1_Gate_Select = 0x1c, - NI_M_Series_Next_SRC_Gate_Select = 0x1d, - NI_M_Series_Analog_Trigger_Out_Gate_Select = 0x1e, - NI_M_Series_Logic_Low_Gate_Select = 0x1f, -}; -#define NI_M_RTSI_GATE_SEL(x) (((x) == 7) ? 0x1b : (0xb + (x))) +/* NI M SERIES gate_select */ +#define NI_M_TIMESTAMP_MUX_GATE_SEL 0x0 #define NI_M_PFI_GATE_SEL(x) (((x) < 10) ? (1 + (x)) : (0xb + (x))) +#define NI_M_RTSI_GATE_SEL(x) (((x) == 7) ? 0x1b : (0xb + (x))) +#define NI_M_AI_START2_GATE_SEL 0x12 +#define NI_M_PXI_STAR_TRIGGER_GATE_SEL 0x13 +#define NI_M_NEXT_OUT_GATE_SEL 0x14 +#define NI_M_AI_START1_GATE_SEL 0x1c +#define NI_M_NEXT_SRC_GATE_SEL 0x1d +#define NI_M_ANALOG_TRIG_OUT_GATE_SEL 0x1e +#define NI_M_LOGIC_LOW_GATE_SEL 0x1f static inline unsigned Gi_Source_Select_Bits(unsigned source) { @@ -1199,21 +1198,21 @@ ni_m_series_first_gate_to_generic_gate_source(unsigned ni_m_series_gate_select) unsigned i; switch (ni_m_series_gate_select) { - case NI_M_Series_Timestamp_Mux_Gate_Select: + case NI_M_TIMESTAMP_MUX_GATE_SEL: return NI_GPCT_TIMESTAMP_MUX_GATE_SELECT; - case NI_M_Series_AI_START2_Gate_Select: + case NI_M_AI_START2_GATE_SEL: return NI_GPCT_AI_START2_GATE_SELECT; - case NI_M_Series_PXI_Star_Trigger_Gate_Select: + case NI_M_PXI_STAR_TRIGGER_GATE_SEL: return NI_GPCT_PXI_STAR_TRIGGER_GATE_SELECT; - case NI_M_Series_Next_Out_Gate_Select: + case NI_M_NEXT_OUT_GATE_SEL: return NI_GPCT_NEXT_OUT_GATE_SELECT; - case NI_M_Series_AI_START1_Gate_Select: + case NI_M_AI_START1_GATE_SEL: return NI_GPCT_AI_START1_GATE_SELECT; - case NI_M_Series_Next_SRC_Gate_Select: + case NI_M_NEXT_SRC_GATE_SEL: return NI_GPCT_NEXT_SOURCE_GATE_SELECT; - case NI_M_Series_Analog_Trigger_Out_Gate_Select: + case NI_M_ANALOG_TRIG_OUT_GATE_SEL: return NI_GPCT_ANALOG_TRIGGER_OUT_GATE_SELECT; - case NI_M_Series_Logic_Low_Gate_Select: + case NI_M_LOGIC_LOW_GATE_SEL: return NI_GPCT_LOGIC_LOW_GATE_SELECT; default: for (i = 0; i <= NI_M_MAX_RTSI_CHAN; ++i) { |