Staging: comedi: das1800: fixed multiple brace coding style issues and pointer declaration style errors
Fixed coding style issues Signed-off-by: Matthew Skolaut <tech2077@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
ee4d07d8e1
commit
a142785d7c
|
@ -199,7 +199,7 @@ static void das1800_flush_dma(struct comedi_device *dev,
|
||||||
struct comedi_subdevice *s);
|
struct comedi_subdevice *s);
|
||||||
static void das1800_flush_dma_channel(struct comedi_device *dev,
|
static void das1800_flush_dma_channel(struct comedi_device *dev,
|
||||||
struct comedi_subdevice *s,
|
struct comedi_subdevice *s,
|
||||||
unsigned int channel, uint16_t * buffer);
|
unsigned int channel, uint16_t *buffer);
|
||||||
static void das1800_handle_fifo_half_full(struct comedi_device *dev,
|
static void das1800_handle_fifo_half_full(struct comedi_device *dev,
|
||||||
struct comedi_subdevice *s);
|
struct comedi_subdevice *s);
|
||||||
static void das1800_handle_fifo_not_empty(struct comedi_device *dev,
|
static void das1800_handle_fifo_not_empty(struct comedi_device *dev,
|
||||||
|
@ -1051,9 +1051,8 @@ static void munge_data(struct comedi_device *dev, uint16_t * array,
|
||||||
|
|
||||||
/* convert to unsigned type if we are in a bipolar mode */
|
/* convert to unsigned type if we are in a bipolar mode */
|
||||||
if (!unipolar) {
|
if (!unipolar) {
|
||||||
for (i = 0; i < num_elements; i++) {
|
for (i = 0; i < num_elements; i++)
|
||||||
array[i] = munge_bipolar_sample(dev, array[i]);
|
array[i] = munge_bipolar_sample(dev, array[i]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1061,7 +1060,7 @@ static void munge_data(struct comedi_device *dev, uint16_t * array,
|
||||||
* Assumes dma lock is held */
|
* Assumes dma lock is held */
|
||||||
static void das1800_flush_dma_channel(struct comedi_device *dev,
|
static void das1800_flush_dma_channel(struct comedi_device *dev,
|
||||||
struct comedi_subdevice *s,
|
struct comedi_subdevice *s,
|
||||||
unsigned int channel, uint16_t * buffer)
|
unsigned int channel, uint16_t *buffer)
|
||||||
{
|
{
|
||||||
unsigned int num_bytes, num_samples;
|
unsigned int num_bytes, num_samples;
|
||||||
struct comedi_cmd *cmd = &s->async->cmd;
|
struct comedi_cmd *cmd = &s->async->cmd;
|
||||||
|
@ -1154,7 +1153,8 @@ static void das1800_handle_fifo_not_empty(struct comedi_device *dev,
|
||||||
break;
|
break;
|
||||||
dpnt = inw(dev->iobase + DAS1800_FIFO);
|
dpnt = inw(dev->iobase + DAS1800_FIFO);
|
||||||
/* convert to unsigned type if we are in a bipolar mode */
|
/* convert to unsigned type if we are in a bipolar mode */
|
||||||
if (!unipolar) ;
|
if (!unipolar)
|
||||||
|
;
|
||||||
dpnt = munge_bipolar_sample(dev, dpnt);
|
dpnt = munge_bipolar_sample(dev, dpnt);
|
||||||
cfc_write_to_buffer(s, dpnt);
|
cfc_write_to_buffer(s, dpnt);
|
||||||
if (cmd->stop_src == TRIG_COUNT)
|
if (cmd->stop_src == TRIG_COUNT)
|
||||||
|
@ -1365,9 +1365,8 @@ static int control_a_bits(struct comedi_cmd cmd)
|
||||||
int control_a;
|
int control_a;
|
||||||
|
|
||||||
control_a = FFEN; /* enable fifo */
|
control_a = FFEN; /* enable fifo */
|
||||||
if (cmd.stop_src == TRIG_EXT) {
|
if (cmd.stop_src == TRIG_EXT)
|
||||||
control_a |= ATEN;
|
control_a |= ATEN;
|
||||||
}
|
|
||||||
switch (cmd.start_src) {
|
switch (cmd.start_src) {
|
||||||
case TRIG_EXT:
|
case TRIG_EXT:
|
||||||
control_a |= TGEN | CGSL;
|
control_a |= TGEN | CGSL;
|
||||||
|
@ -1444,9 +1443,8 @@ static int setup_counters(struct comedi_device *dev, struct comedi_cmd cmd)
|
||||||
&(cmd.convert_arg),
|
&(cmd.convert_arg),
|
||||||
cmd.
|
cmd.
|
||||||
flags & TRIG_ROUND_MASK);
|
flags & TRIG_ROUND_MASK);
|
||||||
if (das1800_set_frequency(dev) < 0) {
|
if (das1800_set_frequency(dev) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TRIG_TIMER: /* in burst mode */
|
case TRIG_TIMER: /* in burst mode */
|
||||||
|
@ -1455,9 +1453,8 @@ static int setup_counters(struct comedi_device *dev, struct comedi_cmd cmd)
|
||||||
&(devpriv->divisor2),
|
&(devpriv->divisor2),
|
||||||
&(cmd.scan_begin_arg),
|
&(cmd.scan_begin_arg),
|
||||||
cmd.flags & TRIG_ROUND_MASK);
|
cmd.flags & TRIG_ROUND_MASK);
|
||||||
if (das1800_set_frequency(dev) < 0) {
|
if (das1800_set_frequency(dev) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -1554,11 +1551,10 @@ static int das1800_ai_do_cmd(struct comedi_device *dev,
|
||||||
|
|
||||||
/* disable dma on TRIG_WAKE_EOS, or TRIG_RT
|
/* disable dma on TRIG_WAKE_EOS, or TRIG_RT
|
||||||
* (because dma in handler is unsafe at hard real-time priority) */
|
* (because dma in handler is unsafe at hard real-time priority) */
|
||||||
if (cmd.flags & (TRIG_WAKE_EOS | TRIG_RT)) {
|
if (cmd.flags & (TRIG_WAKE_EOS | TRIG_RT))
|
||||||
devpriv->irq_dma_bits &= ~DMA_ENABLED;
|
devpriv->irq_dma_bits &= ~DMA_ENABLED;
|
||||||
} else {
|
else
|
||||||
devpriv->irq_dma_bits |= devpriv->dma_bits;
|
devpriv->irq_dma_bits |= devpriv->dma_bits;
|
||||||
}
|
|
||||||
/* interrupt on end of conversion for TRIG_WAKE_EOS */
|
/* interrupt on end of conversion for TRIG_WAKE_EOS */
|
||||||
if (cmd.flags & TRIG_WAKE_EOS) {
|
if (cmd.flags & TRIG_WAKE_EOS) {
|
||||||
/* interrupt fifo not empty */
|
/* interrupt fifo not empty */
|
||||||
|
@ -1568,9 +1564,8 @@ static int das1800_ai_do_cmd(struct comedi_device *dev,
|
||||||
devpriv->irq_dma_bits |= FIMD;
|
devpriv->irq_dma_bits |= FIMD;
|
||||||
}
|
}
|
||||||
/* determine how many conversions we need */
|
/* determine how many conversions we need */
|
||||||
if (cmd.stop_src == TRIG_COUNT) {
|
if (cmd.stop_src == TRIG_COUNT)
|
||||||
devpriv->count = cmd.stop_arg * cmd.chanlist_len;
|
devpriv->count = cmd.stop_arg * cmd.chanlist_len;
|
||||||
}
|
|
||||||
|
|
||||||
das1800_cancel(dev, s);
|
das1800_cancel(dev, s);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue