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

staging: comedi: adl_pci9111: fix alignment issue

Use a local variable for the 'devpriv->ai_bounce_buffer' to shorten
the lines in pci9111_handle_fifo_half_full() and gix the checkpath.pl
issue about:

CHECK: Alignment should match open parenthesis
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 0756f8d7
...@@ -417,14 +417,14 @@ static void pci9111_handle_fifo_half_full(struct comedi_device *dev, ...@@ -417,14 +417,14 @@ static void pci9111_handle_fifo_half_full(struct comedi_device *dev,
{ {
struct pci9111_private_data *devpriv = dev->private; struct pci9111_private_data *devpriv = dev->private;
struct comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
unsigned short *buf = devpriv->ai_bounce_buffer;
unsigned int samples; unsigned int samples;
samples = comedi_nsamples_left(s, PCI9111_FIFO_HALF_SIZE); samples = comedi_nsamples_left(s, PCI9111_FIFO_HALF_SIZE);
insw(dev->iobase + PCI9111_AI_FIFO_REG, insw(dev->iobase + PCI9111_AI_FIFO_REG, buf, samples);
devpriv->ai_bounce_buffer, samples);
if (devpriv->scan_delay < 1) { if (devpriv->scan_delay < 1) {
comedi_buf_write_samples(s, devpriv->ai_bounce_buffer, samples); comedi_buf_write_samples(s, buf, samples);
} else { } else {
unsigned int pos = 0; unsigned int pos = 0;
unsigned int to_read; unsigned int to_read;
...@@ -437,9 +437,7 @@ static void pci9111_handle_fifo_half_full(struct comedi_device *dev, ...@@ -437,9 +437,7 @@ static void pci9111_handle_fifo_half_full(struct comedi_device *dev,
if (to_read > samples - pos) if (to_read > samples - pos)
to_read = samples - pos; to_read = samples - pos;
comedi_buf_write_samples(s, comedi_buf_write_samples(s, buf + pos, to_read);
devpriv->ai_bounce_buffer + pos,
to_read);
} else { } else {
to_read = devpriv->chunk_num_samples - to_read = devpriv->chunk_num_samples -
devpriv->chunk_counter; devpriv->chunk_counter;
......
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