staging: comedi: use unsigned sample in cfc_write_to_buffer()
authorIan Abbott <abbotti@mev.co.uk>
Wed, 16 Oct 2013 13:40:05 +0000 (14:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Oct 2013 19:48:16 +0000 (12:48 -0700)
Sample values in comedi are generally represented as unsigned values.
`cfc_write_to_buffer()` in "comedi_fc.h" currently uses `short` to hold
a 16-bit sample value to be written to the buffer.  Change the type of
the parameter to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/comedi_fc.h

index a4dea7cb86bef30294574aa42299793b70eb0308..8558b07f8df3a0bd07267fcfdc7eb0e8d40e4fb2 100644 (file)
@@ -30,7 +30,7 @@ extern unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *subd,
                                              unsigned int num_bytes);
 
 static inline unsigned int cfc_write_to_buffer(struct comedi_subdevice *subd,
-                                              short data)
+                                              unsigned short data)
 {
        return cfc_write_array_to_buffer(subd, &data, sizeof(data));
 };