Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f4e0331f authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: ni_tio: export and fix ni_tio_set_bits()



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

Fix the checkpatch.pl issue:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

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

This allows moving ni_tio_set_bits_transient() into the driver and
making it static.

Fix the checkpatch.pl issue:
CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code
       rather than BUG() or BUG_ON()

The BUG_ON() is overkill. All the drivers that call this function pass
'register_index' values that are valid. Just check the 'register_index'
before updating the software copy and writing the register.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 85bfafa8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment