]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: comedi: comedi_test: use unsigned short for loopback values
authorIan Abbott <abbotti@mev.co.uk>
Tue, 27 Oct 2015 16:59:21 +0000 (16:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Oct 2015 23:58:36 +0000 (08:58 +0900)
The last sample values written to the AO subdevice channels by its
"insn_write" handler `waveform_ao_insn_write()` are stored in the member
array `ao_loopbacks[]` in the device private data `struct
waveform_private`.  They can be read back via the "insn_read" handler of
the AI subdevice `waveform_ai_insn_read()`.  As the stored sample values
are only 16 bits wide, change the type of the `ao_loopbacks[]` member to
`unsigned short` to save some space.

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

index 9655dc333e3494c85bae485eedd14324201e0728..a750f84529ff638bd64f203f43acd00ca6504f23 100644 (file)
@@ -70,7 +70,7 @@ struct waveform_private {
        unsigned long state_bits;
        unsigned int ai_scan_period;    /* AI scan period in usec */
        unsigned int ai_convert_period; /* AI conversion period in usec */
-       unsigned int ao_loopbacks[N_CHANS];
+       unsigned short ao_loopbacks[N_CHANS];
 };
 
 /* fake analog input ranges */