]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcbf150de5e3dd83af3d3b3f2200bfed5c032dbdc
treea709a7ee54b2798afcc9feed6a9a1c82044714f4
parentbf85fc107e5ffc8053a0ce0343ff413d5da9d1ab
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