staging: comedi: ni_tio: export and fix ni_tio_get_soft_copy()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 23 Mar 2016 22:36:41 +0000 (15:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
commit85bfafa81f8e422503d31d48ae2658675aad1929
treec0d324f3c221634aac9fb2505bd0634a88385399
parentc9813d50a514b451c4ad3acf1f5a400fff005c70
staging: comedi: ni_tio: export and fix ni_tio_get_soft_copy()

Move the inline function from the header and export it instead.

For the checkpatch.pl issues:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code
       rather than BUG() or BUG_ON()

The 'unsigned' vars can safely be changed to 'unsigned int'.

The BUG_ON() is overkill. All the drivers that call this function pass
'register_index' values that are valid. Just check the 'register_index'
and return 0 if it's not valid.

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>
drivers/staging/comedi/drivers/ni_tio.c
drivers/staging/comedi/drivers/ni_tio_internal.h