diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-07-28 10:26:53 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-30 16:50:59 -0700 |
commit | 24a675c5130198fcf354325f108b4a62aa7575a5 (patch) | |
tree | 658985310213e65bf5ae21e1b9464dacff413000 /drivers/staging/comedi/drivers/ni_tio.c | |
parent | 4359dcf3564500e37e5da4eba7b4bd7f1847096b (diff) |
staging: comedi: ni_tio: tidy up Gxx_Status_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are 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.c')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_tio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c index 15364128c91f..ccdf96ed6539 100644 --- a/drivers/staging/comedi/drivers/ni_tio.c +++ b/drivers/staging/comedi/drivers/ni_tio.c @@ -1200,9 +1200,9 @@ int ni_tio_insn_config(struct comedi_device *dev, case INSN_CONFIG_GET_COUNTER_STATUS: data[1] = 0; status = read_register(counter, NITIO_SHARED_STATUS_REG(cidx)); - if (status & Gi_Armed_Bit(cidx)) { + if (status & GI_ARMED(cidx)) { data[1] |= COMEDI_COUNTER_ARMED; - if (status & Gi_Counting_Bit(cidx)) + if (status & GI_COUNTING(cidx)) data[1] |= COMEDI_COUNTER_COUNTING; } data[2] = COMEDI_COUNTER_ARMED | COMEDI_COUNTER_COUNTING; @@ -1289,7 +1289,7 @@ static unsigned ni_tio_next_load_register(struct ni_gpct *counter) const unsigned bits = read_register(counter, NITIO_SHARED_STATUS_REG(cidx)); - return (bits & Gi_Next_Load_Source_Bit(cidx)) + return (bits & GI_NEXT_LOAD_SRC(cidx)) ? NITIO_LOADB_REG(cidx) : NITIO_LOADA_REG(cidx); } |