]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
staging: comedi: adl_pci6208: fix the ao_readback variable size
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 27 Jun 2012 22:04:47 +0000 (15:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2012 22:40:06 +0000 (15:40 -0700)
commit5c67df8b98316fbfede8d4d6bac64d52d4327357
treef71e0b53b69796faa84f6ab3f075dcbe4936096b
parent149b98d1ea4e5d798cd7f954a239ed512c3bf7e5
staging: comedi: adl_pci6208: fix the ao_readback variable size

The 'ao_readback' variable in the private data struct is used to
cache the last value written to the analog output DAC channels.
The PCI-6208 has 8 analog output channels but the variable only
allowed space to cache 2 values.

Since the PCI-6216 board could be supported by this driver and
it has 16 analog outputs, create a define for the maximum number
of channels and use that to set the size of 'ao_readback'.

For now, set the max to 8 to save space since the PCI-6216 is
not currently supported.

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