]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: adl_pci9118: tidy up check_channel_list()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 19 Oct 2015 20:12:58 +0000 (13:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 02:17:13 +0000 (19:17 -0700)
commit24b0e9fb03087b5e4836f6620afe3e3ac216e70f
tree1ba56cc615fb5ab81247c4b9ada862a7d1c7fb2b
parente5a5f8e6e9a3e5358ff4814d9a349566de173c35
staging: comedi: adl_pci9118: tidy up check_channel_list()

Rename this function to give it namespace associated with the driver.

Currently this function is called by both the AI (*do_cmdtest) and the (*do_cmd)
functions. It really only needs to be called by the (*do_cmdtest) to validate
that the chanlist meets the requirements of the hardware. It's only called by
the (*do_cmd) to verify that the scan length is not to large after adding the
extra samples needed to satisfy the DMA.

Move the extra scan length check into the (*do_cmd) function and remove the
unnecessary parameters 'frontadd' and 'backadd'.

Tidy up the reset of the function.

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/adl_pci9118.c