staging: comedi: adv_pci1724: introduce adv_pci1724_insn_write()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 20 Nov 2014 22:10:48 +0000 (15:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 23:36:40 +0000 (15:36 -0800)
commitdcbd4ed87cc82398238eb870008a338b4faec76f
treea709a7ee54b2798afcc9feed6a9a1c82044714f4
parent21cdf8f43b85a9e6c9905dbeb401e4a4d1c8a6c3
staging: comedi: adv_pci1724: introduce adv_pci1724_insn_write()

The analog output, offset calib, and gain calib subdevices all use similar
(*insn_write) functions. The onyl difference is the 'mode' that is passed
to the set_dac() helper.

Introduce a new (*insn_write) function that can be used by all the subdevices.
Use the s->private member to pass the 'mode' needed by set_dac(). Remove the
subdevice specific (*insn_write) functions.

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