Commit 766b1f95 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: dt282x: sample types are unsigned

Sample values in comedi are generally represented as unsigned values.
Change various members of `struct dt282x_private` and various parameters
and variables dealing with samples to use `unsigned short` instead of
`short` for consistency.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 65a62aae
...@@ -226,7 +226,7 @@ struct dt282x_private { ...@@ -226,7 +226,7 @@ struct dt282x_private {
const struct comedi_lrange *darangelist[2]; const struct comedi_lrange *darangelist[2];
short ao[2]; unsigned short ao[2];
volatile int dacsr; /* software copies of registers */ volatile int dacsr; /* software copies of registers */
volatile int adcsr; volatile int adcsr;
...@@ -237,7 +237,7 @@ struct dt282x_private { ...@@ -237,7 +237,7 @@ struct dt282x_private {
struct { struct {
int chan; int chan;
short *buf; /* DMA buffer */ unsigned short *buf; /* DMA buffer */
volatile int size; /* size of current transfer */ volatile int size; /* size of current transfer */
} dma[2]; } dma[2];
int dma_maxsize; /* max size of DMA transfer (in bytes) */ int dma_maxsize; /* max size of DMA transfer (in bytes) */
...@@ -283,7 +283,7 @@ static void dt282x_disable_dma(struct comedi_device *dev); ...@@ -283,7 +283,7 @@ static void dt282x_disable_dma(struct comedi_device *dev);
static int dt282x_grab_dma(struct comedi_device *dev, int dma1, int dma2); static int dt282x_grab_dma(struct comedi_device *dev, int dma1, int dma2);
static void dt282x_munge(struct comedi_device *dev, short *buf, static void dt282x_munge(struct comedi_device *dev, unsigned short *buf,
unsigned int nbytes) unsigned int nbytes)
{ {
const struct dt282x_board *board = comedi_board(dev); const struct dt282x_board *board = comedi_board(dev);
...@@ -496,9 +496,9 @@ static irqreturn_t dt282x_interrupt(int irq, void *d) ...@@ -496,9 +496,9 @@ static irqreturn_t dt282x_interrupt(int irq, void *d)
#if 0 #if 0
if (adcsr & DT2821_ADDONE) { if (adcsr & DT2821_ADDONE) {
int ret; int ret;
short data; unsigned short data;
data = (short)inw(dev->iobase + DT2821_ADDAT); data = inw(dev->iobase + DT2821_ADDAT);
data &= (1 << board->adbits) - 1; data &= (1 << board->adbits) - 1;
if (devpriv->ad_2scomp) if (devpriv->ad_2scomp)
...@@ -796,7 +796,7 @@ static int dt282x_ao_insn_write(struct comedi_device *dev, ...@@ -796,7 +796,7 @@ static int dt282x_ao_insn_write(struct comedi_device *dev,
{ {
const struct dt282x_board *board = comedi_board(dev); const struct dt282x_board *board = comedi_board(dev);
struct dt282x_private *devpriv = dev->private; struct dt282x_private *devpriv = dev->private;
short d; unsigned short d;
unsigned int chan; unsigned int chan;
chan = CR_CHAN(insn->chanspec); chan = CR_CHAN(insn->chanspec);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment