summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2013-10-16 14:40:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-16 12:48:19 -0700
commiteabbf3f43fd91f69f3d15eab8135757d9ddda4b6 (patch)
treef1226db1ea61568f1a1550c5953bc5da1f6c6a0a /drivers/staging/comedi
parent920983458cbf4213e8a99567d8d22c3721723cd1 (diff)
downloadop-kernel-dev-eabbf3f43fd91f69f3d15eab8135757d9ddda4b6.zip
op-kernel-dev-eabbf3f43fd91f69f3d15eab8135757d9ddda4b6.tar.gz
staging: comedi: das16m1: sample types are unsigned
Sample values in comedi are generally represented as unsigned values. Change the element type of the `ai_buffer[]` member of `struct das16m1_private_struct` and the types used by `munge_sample()` and `munge_sample_array()` from `short` to `unsigned short` for consistency. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/das16m1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c
index 579b74e..fce9acf 100644
--- a/drivers/staging/comedi/drivers/das16m1.c
+++ b/drivers/staging/comedi/drivers/das16m1.c
@@ -131,18 +131,18 @@ struct das16m1_private_struct {
* needed to keep track of whether new count has been loaded into
* counter yet (loaded by first sample conversion) */
u16 initial_hw_count;
- short ai_buffer[FIFO_SIZE];
+ unsigned short ai_buffer[FIFO_SIZE];
unsigned int divisor1; /* divides master clock to obtain conversion speed */
unsigned int divisor2; /* divides master clock to obtain conversion speed */
unsigned long extra_iobase;
};
-static inline short munge_sample(short data)
+static inline unsigned short munge_sample(unsigned short data)
{
return (data >> 4) & 0xfff;
}
-static void munge_sample_array(short *array, unsigned int num_elements)
+static void munge_sample_array(unsigned short *array, unsigned int num_elements)
{
unsigned int i;
OpenPOWER on IntegriCloud