staging: comedi: adl_pci9111: simplify A/D trigger selection code
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 29 May 2014 17:35:10 +0000 (10:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jun 2014 21:45:15 +0000 (14:45 -0700)
commit3e18c5284ad4ba93eafd1f1f528bff21a962e5d0
tree6ece9da1bc31b8c154e185b88468a6a40219218a
parentd76fdfcc6d774c2465e90bb7aa2e5ad7d1ff08cf
staging: comedi: adl_pci9111: simplify A/D trigger selection code

The functions pci9111_trigger_source_set(), pci9111_pretrigger_set(),
and pci9111_autoscan_set() are all used to select the A/D trigger type.
They all do a read/mask/set/write of the A/D Trigger Mode Control register.

Simplify the code by removing these helper functions and combining all
the trigger bits so that a single write can be used to set the register.

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_pci9111.c