staging: comedi: adv_pci1710: tidy up pci1710_reset()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 13 Nov 2015 18:11:22 +0000 (11:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Dec 2015 22:56:30 +0000 (14:56 -0800)
commit0c917a93654557dc2489ebacbeadc3851186e3ce
tree1047272cf98312d4735d7b8a722eaf1096e811aa
parentadbc9ec7fe38baa8af2a3d21e3f505c8a8da7c3b
staging: comedi: adv_pci1710: tidy up pci1710_reset()

Change the return type to void, this function always succeeds and the
caller does not check the return value anyway.

Fix the initial programming of the control register. The SW bit enables
the software trigger and should not be set here. Setting CNT0 selects the
external clock source for counter 0 (the user counter). It makes more
sense to select the internal 1 MHz clock.

Remove the unnecessary initialization of the private data members. This
function is only called during the (*auto_attach) after the private
data was kzalloc'ed.

Remove the redundant clearing of the A/D FIFO and pending interrupts.
Just do it once.

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