Commit 2d238b29 authored by Andrea Gelmini's avatar Andrea Gelmini Committed by Greg Kroah-Hartman

Staging: comedi: cb_pcidas.c: Checkpatch cleanup

ERROR: "foo * bar" should be "foo *bar"
+		      uint8_t * data);

WARNING: braces {} are not necessary for single statement blocks
+		if (devpriv->s5933_config) {
+			comedi_pci_disable(devpriv->pci_dev);
+		}

WARNING: braces {} are not necessary for single statement blocks
+	if (cmd->stop_src == TRIG_COUNT) {
+		devpriv->count = cmd->chanlist_len * cmd->stop_arg;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (cmd->stop_src == TRIG_COUNT) {
+		devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (cmd->stop_src == TRIG_COUNT) {
+		devpriv->ao_count -= num_points;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (dev->attached == 0) {
+		return IRQ_NONE;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) {
+		comedi_error(dev, "spurious interrupt");
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (status & (DAHFI | DAEMI)) {
+		handle_ao_interrupt(dev, status);
+	}

WARNING: braces {} are not necessary for single statement blocks
+		if (async->cmd.stop_src == TRIG_COUNT) {
+			devpriv->ao_count -= num_points;
+		}

ERROR: "foo * bar" should be "foo *bar"
+		      uint8_t * data)
Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 882e1233
...@@ -518,7 +518,7 @@ static int trimpot_7376_write(struct comedi_device *dev, uint8_t value); ...@@ -518,7 +518,7 @@ static int trimpot_7376_write(struct comedi_device *dev, uint8_t value);
static int trimpot_8402_write(struct comedi_device *dev, unsigned int channel, static int trimpot_8402_write(struct comedi_device *dev, unsigned int channel,
uint8_t value); uint8_t value);
static int nvram_read(struct comedi_device *dev, unsigned int address, static int nvram_read(struct comedi_device *dev, unsigned int address,
uint8_t * data); uint8_t *data);
static inline unsigned int cal_enable_bits(struct comedi_device *dev) static inline unsigned int cal_enable_bits(struct comedi_device *dev)
{ {
...@@ -760,9 +760,8 @@ static int cb_pcidas_detach(struct comedi_device *dev) ...@@ -760,9 +760,8 @@ static int cb_pcidas_detach(struct comedi_device *dev)
if (dev->subdevices) if (dev->subdevices)
subdev_8255_cleanup(dev, dev->subdevices + 2); subdev_8255_cleanup(dev, dev->subdevices + 2);
if (devpriv && devpriv->pci_dev) { if (devpriv && devpriv->pci_dev) {
if (devpriv->s5933_config) { if (devpriv->s5933_config)
comedi_pci_disable(devpriv->pci_dev); comedi_pci_disable(devpriv->pci_dev);
}
pci_dev_put(devpriv->pci_dev); pci_dev_put(devpriv->pci_dev);
} }
...@@ -1248,9 +1247,8 @@ static int cb_pcidas_ai_cmd(struct comedi_device *dev, ...@@ -1248,9 +1247,8 @@ static int cb_pcidas_ai_cmd(struct comedi_device *dev,
cmd->flags & TRIG_ROUND_MASK); cmd->flags & TRIG_ROUND_MASK);
/* set number of conversions */ /* set number of conversions */
if (cmd->stop_src == TRIG_COUNT) { if (cmd->stop_src == TRIG_COUNT)
devpriv->count = cmd->chanlist_len * cmd->stop_arg; devpriv->count = cmd->chanlist_len * cmd->stop_arg;
}
/* enable interrupts */ /* enable interrupts */
spin_lock_irqsave(&dev->spinlock, flags); spin_lock_irqsave(&dev->spinlock, flags);
devpriv->adc_fifo_bits |= INTE; devpriv->adc_fifo_bits |= INTE;
...@@ -1449,9 +1447,8 @@ static int cb_pcidas_ao_cmd(struct comedi_device *dev, ...@@ -1449,9 +1447,8 @@ static int cb_pcidas_ao_cmd(struct comedi_device *dev,
devpriv->ao_divisor2, 2); devpriv->ao_divisor2, 2);
} }
/* set number of conversions */ /* set number of conversions */
if (cmd->stop_src == TRIG_COUNT) { if (cmd->stop_src == TRIG_COUNT)
devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg; devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg;
}
/* set pacer source */ /* set pacer source */
spin_lock_irqsave(&dev->spinlock, flags); spin_lock_irqsave(&dev->spinlock, flags);
switch (cmd->scan_begin_src) { switch (cmd->scan_begin_src) {
...@@ -1494,9 +1491,8 @@ static int cb_pcidas_ao_inttrig(struct comedi_device *dev, ...@@ -1494,9 +1491,8 @@ static int cb_pcidas_ao_inttrig(struct comedi_device *dev,
num_points * sizeof(short)); num_points * sizeof(short));
num_points = num_bytes / sizeof(short); num_points = num_bytes / sizeof(short);
if (cmd->stop_src == TRIG_COUNT) { if (cmd->stop_src == TRIG_COUNT)
devpriv->ao_count -= num_points; devpriv->ao_count -= num_points;
}
/* write data to board's fifo */ /* write data to board's fifo */
outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, num_bytes); outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, num_bytes);
...@@ -1534,9 +1530,8 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d) ...@@ -1534,9 +1530,8 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
static const int timeout = 10000; static const int timeout = 10000;
unsigned long flags; unsigned long flags;
if (dev->attached == 0) { if (dev->attached == 0)
return IRQ_NONE; return IRQ_NONE;
}
async = s->async; async = s->async;
async->events = 0; async->events = 0;
...@@ -1558,15 +1553,13 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d) ...@@ -1558,15 +1553,13 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
status = inw(devpriv->control_status + INT_ADCFIFO); status = inw(devpriv->control_status + INT_ADCFIFO);
#ifdef CB_PCIDAS_DEBUG #ifdef CB_PCIDAS_DEBUG
if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) { if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0)
comedi_error(dev, "spurious interrupt"); comedi_error(dev, "spurious interrupt");
}
#endif #endif
/* check for analog output interrupt */ /* check for analog output interrupt */
if (status & (DAHFI | DAEMI)) { if (status & (DAHFI | DAEMI))
handle_ao_interrupt(dev, status); handle_ao_interrupt(dev, status);
}
/* check for analog input interrupts */ /* check for analog input interrupts */
/* if fifo half-full */ /* if fifo half-full */
if (status & ADHFI) { if (status & ADHFI) {
...@@ -1675,9 +1668,8 @@ static void handle_ao_interrupt(struct comedi_device *dev, unsigned int status) ...@@ -1675,9 +1668,8 @@ static void handle_ao_interrupt(struct comedi_device *dev, unsigned int status)
num_points * sizeof(short)); num_points * sizeof(short));
num_points = num_bytes / sizeof(short); num_points = num_bytes / sizeof(short);
if (async->cmd.stop_src == TRIG_COUNT) { if (async->cmd.stop_src == TRIG_COUNT)
devpriv->ao_count -= num_points; devpriv->ao_count -= num_points;
}
/* write data to board's fifo */ /* write data to board's fifo */
outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer,
num_points); num_points);
...@@ -1852,7 +1844,7 @@ static int wait_for_nvram_ready(unsigned long s5933_base_addr) ...@@ -1852,7 +1844,7 @@ static int wait_for_nvram_ready(unsigned long s5933_base_addr)
} }
static int nvram_read(struct comedi_device *dev, unsigned int address, static int nvram_read(struct comedi_device *dev, unsigned int address,
uint8_t * data) uint8_t *data)
{ {
unsigned long iobase = devpriv->s5933_config; unsigned long iobase = devpriv->s5933_config;
......
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