staging: comedi: ni_pcidio: sample types are unsigned

Sample values in comedi are generally represented as unsigned values.
Change `nidio_interrupt()` to use unsigned types for sample values
(actually bit-vectors of 1-bit sample values) instead of signed types.

Also rename the `AuxData` variable to `auxdata` and change it from
`long` to `unsigned int` as it only needs to hold a 32-bit value.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ian Abbott 2013-10-16 14:40:27 +01:00 committed by Greg Kroah-Hartman
parent 3a2b101cc5
commit 319b67ae1c
1 changed files with 6 additions and 6 deletions

View File

@ -406,9 +406,9 @@ static irqreturn_t nidio_interrupt(int irq, void *d)
struct mite_struct *mite = devpriv->mite; struct mite_struct *mite = devpriv->mite;
/* int i, j; */ /* int i, j; */
long int AuxData = 0; unsigned int auxdata = 0;
short data1 = 0; unsigned short data1 = 0;
short data2 = 0; unsigned short data2 = 0;
int flags; int flags;
int status; int status;
int work = 0; int work = 0;
@ -481,11 +481,11 @@ static irqreturn_t nidio_interrupt(int irq, void *d)
); );
goto out; goto out;
} }
AuxData = auxdata =
readl(devpriv->mite->daq_io_addr + readl(devpriv->mite->daq_io_addr +
Group_1_FIFO); Group_1_FIFO);
data1 = AuxData & 0xffff; data1 = auxdata & 0xffff;
data2 = (AuxData & 0xffff0000) >> 16; data2 = (auxdata & 0xffff0000) >> 16;
comedi_buf_put(async, data1); comedi_buf_put(async, data1);
comedi_buf_put(async, data2); comedi_buf_put(async, data2);
/* DPRINTK("read:%d, %d\n",data1,data2); */ /* DPRINTK("read:%d, %d\n",data1,data2); */