[PATCH 02/19] staging: comedi: ni_tio: tidy up Gi_Counting_Mode_Reg_Bits

Ian Abbott abbotti at mev.co.uk
Tue Jul 29 09:07:25 UTC 2014


On 2014-07-28 18:26, H Hartley Sweeten wrote:
> Convert this enum into defines and rename all the CamelCase symbols.
>
> For aesthetics, move the new defines so they are associated with the
> register define.
>
> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
> Cc: Ian Abbott <abbotti at mev.co.uk>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> ---
>   drivers/staging/comedi/drivers/ni_tio.c          | 99 ++++++++++--------------
>   drivers/staging/comedi/drivers/ni_tio_internal.h | 56 +++++---------
>   2 files changed, 64 insertions(+), 91 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
> index 6ed14df..1baad07 100644
> --- a/drivers/staging/comedi/drivers/ni_tio.c
> +++ b/drivers/staging/comedi/drivers/ni_tio.c
> @@ -116,59 +116,55 @@ TODO:
>   #define NI_660X_LOGIC_LOW_GATE2_SEL	0x1f
>   #define NI_660X_MAX_UP_DOWN_PIN		7
>
> -static inline enum Gi_Counting_Mode_Reg_Bits
> -Gi_Alternate_Sync_Bit(enum ni_gpct_variant variant)
> +static inline unsigned GI_ALT_SYNC(enum ni_gpct_variant variant)

Does that really need to be inline and ALL CAPS?  There may be some 
justification for using all caps, but the compiler ought to decide 
whether to inline it.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-


More information about the devel mailing list