Commit cc3ddba2 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: das1800: change type of private data 'fifo_buf'

Fix the checkpatch.pl issue:
CHECK: Prefer kernel type 'u16' over 'uint16_t'

Change the type to 'unsigned short' as that is more typical in comedi
drivers.

Use sizeof(*p) instead of sizeof(type) when allocation the buffer.
Also fix the checkpatch.pl issue:
WARNING: line over 80 characters
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bface0f3
...@@ -304,7 +304,7 @@ struct das1800_private { ...@@ -304,7 +304,7 @@ struct das1800_private {
/* dma bits for control register b, stored so that dma can be /* dma bits for control register b, stored so that dma can be
* turned on and off */ * turned on and off */
int dma_bits; int dma_bits;
uint16_t *fifo_buf; /* bounce buffer for analog input FIFO */ unsigned short *fifo_buf;
unsigned long iobase2; /* secondary io address used for analog out on 'ao' boards */ unsigned long iobase2; /* secondary io address used for analog out on 'ao' boards */
bool ai_is_unipolar; bool ai_is_unipolar;
}; };
...@@ -1200,7 +1200,9 @@ static int das1800_attach(struct comedi_device *dev, ...@@ -1200,7 +1200,9 @@ static int das1800_attach(struct comedi_device *dev,
if (dev->irq & it->options[2]) if (dev->irq & it->options[2])
das1800_init_dma(dev, it); das1800_init_dma(dev, it);
devpriv->fifo_buf = kmalloc_array(FIFO_SIZE, sizeof(uint16_t), GFP_KERNEL); devpriv->fifo_buf = kmalloc_array(FIFO_SIZE,
sizeof(*devpriv->fifo_buf),
GFP_KERNEL);
if (!devpriv->fifo_buf) if (!devpriv->fifo_buf)
return -ENOMEM; return -ENOMEM;
......
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