staging: comedi: drivers: cleanup cmd->flags use
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Sat, 19 Jul 2014 00:01:16 +0000 (17:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jul 2014 21:43:01 +0000 (14:43 -0700)
commita207c12f62e8b53e1e1600ca384b13a39a9feed2
treeed32cfa28deb3711f6b3e2b86319cdeffacb8ab9
parent79014eb1f25e145ea0dc70c628d1ad24106afba3
staging: comedi: drivers: cleanup cmd->flags use

Most of the comedi drivers that support async commands have some sort
of timer to control the acquisition timing. For these drivers, Step 4
of the (*do_cmdtest) operations calls a ns_to_timer() function that
converts the desired ns time of the command into a value used to set
the timer. These ns_to_timer() functions also typically pass the
cmd->flags in order to determine the desired rounding mode.

Some of the drivers mask the cmd->flags with TRIG_ROUND_MASK when
calling the ns_to_timer() functions. Move all the masking into the
ns_to_timer() functions and just pass the cmd->flags directly.

The cmd->flags member is an unsigned int, change the parameter type
in the the ns_to_timer() functions to match.

For aesthetics, rename the parameter in all the ns_to_timer()
functions to 'flags'.

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>
14 files changed:
drivers/staging/comedi/drivers/8253.h
drivers/staging/comedi/drivers/addi_apci_3xxx.c
drivers/staging/comedi/drivers/amplc_pci230.c
drivers/staging/comedi/drivers/das16.c
drivers/staging/comedi/drivers/dmm32at.c
drivers/staging/comedi/drivers/dt2814.c
drivers/staging/comedi/drivers/dt3000.c
drivers/staging/comedi/drivers/ni_at_a2150.c
drivers/staging/comedi/drivers/ni_mio_common.c
drivers/staging/comedi/drivers/ni_pcidio.c
drivers/staging/comedi/drivers/quatech_daqp_cs.c
drivers/staging/comedi/drivers/rtd520.c
drivers/staging/comedi/drivers/s626.c
drivers/staging/comedi/drivers/skel.c