]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: ni_mio_common: add "no_channel" versions of some functions
authorAndrzej Pietrasiewicz <andrzejtp2010@gmail.com>
Sat, 14 Nov 2015 18:19:10 +0000 (19:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 23:56:01 +0000 (15:56 -0800)
commitc9e5ec256c7af7f1558290b66dd145326c403a18
treeeee6163d074099d4aa30eea183054cf12f264698
parentaf904c49422be93dd182d45d0c9c3d1862ab72b0
staging: comedi: ni_mio_common: add "no_channel" versions of some functions

ni_release_ai_mite_channel(), ni_release_ao_mite_channel(),
ni_release_gpct_mite_channel() and ni_release_cdo_mite_channel()
call functions which interpret -1 as a special value meaning "no channel".
This patch adds explicit "no_channel" versions instead.

On the other hand, after "no_channel" versions are used,
ni_set_ai_dma_channel(), ni_set_ao_dma_channel(),
ni_set_gpct_dma_channel(), ni_set_cdo_dma_channel() are called with actual
"channel" parameter being always unsigned, so their signatures are changed
accordingly.

A side benefit of the changes is suppressesing 4 sparse warnings:
"warning: shift too big (4294967295) for type int".

Signed-off-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_mio_common.c