]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: usbduxsigma: cleanup the private data 'outBuffer'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 23 May 2013 20:04:53 +0000 (13:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2013 11:41:07 +0000 (20:41 +0900)
commitfb365ab09d2bc2c62c5d4f53ecfcfad4d6470e3c
treef9a328b44be27efa9825c90467b1201f5dd59b81
parent2d2311e5ad50846a8769db228bfcaf03b3ce6616
staging: comedi: usbduxsigma: cleanup the private data 'outBuffer'

This buffer is used to cache the analog output values that are written
to the analog output channels. Currently it only caches the single
writes to the channels using the (*insn_write) callback. The async
command writes are not cached. The buffer is also being kzalloc'ed
during the attach of the driver to a size much larger that required.

Rename the CamelCase buffer and change it to an array in the private
data of the correct size to cache the analog output channel values.

Modify the analog output urb callback so it updates the cached values
with those used for the asynchronous command to allow readback after
the command completes.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/usbduxsigma.c