]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: adv_pci1710: sample types are unsigned
authorIan Abbott <abbotti@mev.co.uk>
Wed, 16 Oct 2013 13:40:10 +0000 (14:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Oct 2013 19:48:17 +0000 (12:48 -0700)
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_data[]` member of `struct
pci1710_private` from `short` to `unsigned short` for consistency.  Also
remove the `ai_data` member as it is only assigned to.  Change various
local variables used to hold sample values to `unsigned short`.

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

index 49b39ec22708ee87888465d60449a5fafb4c65fc..c3fdcabe9aec6ac77626e0cecee123dc9d7c597e 100644 (file)
@@ -314,10 +314,9 @@ struct pci1710_private {
        unsigned int *ai_chanlist;      /*  actaul chanlist */
        unsigned int ai_flags;  /*  flaglist */
        unsigned int ai_data_len;       /*  len of data buffer */
-       short *ai_data;         /*  data buffer */
        unsigned int ai_timer1; /*  timers */
        unsigned int ai_timer2;
-       short ao_data[4];       /*  data output buffer */
+       unsigned short ao_data[4];      /*  data output buffer */
        unsigned int cnt0_write_wait;   /* after a write, wait for update of the
                                         * internal state */
 };
@@ -736,7 +735,7 @@ static void interrupt_pci1710_every_sample(void *d)
        int m;
 #ifdef PCI171x_PARANOIDCHECK
        const struct boardtype *this_board = comedi_board(dev);
-       short sampl;
+       unsigned short sampl;
 #endif
 
        m = inw(dev->iobase + PCI171x_STATUS);
@@ -817,7 +816,7 @@ static int move_block_from_fifo(struct comedi_device *dev,
        int i, j;
 #ifdef PCI171x_PARANOIDCHECK
        const struct boardtype *this_board = comedi_board(dev);
-       int sampl;
+       unsigned short sampl;
 #endif
 
        j = s->async->cur_chan;
@@ -1122,7 +1121,6 @@ static int pci171x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        devpriv->ai_chanlist = cmd->chanlist;
        devpriv->ai_flags = cmd->flags;
        devpriv->ai_data_len = s->async->prealloc_bufsz;
-       devpriv->ai_data = s->async->prealloc_buf;
        devpriv->ai_timer1 = 0;
        devpriv->ai_timer2 = 0;