From 2fb5cd385cb7ed56ce1ffd24264c3d5584972345 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 16 Oct 2013 14:40:24 +0100 Subject: [PATCH] staging: comedi: ni_at_a2150: sample types are unsigned Sample values in comedi are generally represented by unsigned values. Change the type of the `dma_buffer` member of `struct a2150_private` from `s16 *` to `uint16_t *`, and change the type of the `dpnt` variable in `a2150_interrupt()` to `unsigned short` for consistency. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_a2150.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index c77d34306119..63c847932eb8 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -154,7 +154,7 @@ struct a2150_private { volatile unsigned int count; /* number of data points left to be taken */ unsigned int dma; /* dma channel */ - s16 *dma_buffer; /* dma buffer */ + uint16_t *dma_buffer; /* dma buffer */ unsigned int dma_transfer_size; /* size in bytes of dma transfers */ int irq_dma_bits; /* irq/dma register bits */ int config_bits; /* config register bits */ @@ -192,7 +192,7 @@ static irqreturn_t a2150_interrupt(int irq, void *d) struct comedi_async *async; struct comedi_cmd *cmd; unsigned int max_points, num_points, residue, leftover; - short dpnt; + unsigned short dpnt; static const int sample_size = sizeof(devpriv->dma_buffer[0]); if (!dev->attached) { -- 2.30.2