aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAndrea Gelmini <andrea.gelmini@gelma.net>2010-02-26 04:14:59 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 19:43:05 -0500
commit2d238b2972bf365153ae8d699177c7a19a5f3056 (patch)
treeafeb16b2253361221cc8942522542c21195faec1 /drivers/staging
parent882e1233a1abb650149496b33eaeb1d09bbc0b7a (diff)
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: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/comedi/drivers/cb_pcidas.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c
index f3e66c440a38..434591de37c5 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas.c
@@ -518,7 +518,7 @@ static int trimpot_7376_write(struct comedi_device *dev, uint8_t value);
518static int trimpot_8402_write(struct comedi_device *dev, unsigned int channel, 518static int trimpot_8402_write(struct comedi_device *dev, unsigned int channel,
519 uint8_t value); 519 uint8_t value);
520static int nvram_read(struct comedi_device *dev, unsigned int address, 520static int nvram_read(struct comedi_device *dev, unsigned int address,
521 uint8_t * data); 521 uint8_t *data);
522 522
523static inline unsigned int cal_enable_bits(struct comedi_device *dev) 523static inline unsigned int cal_enable_bits(struct comedi_device *dev)
524{ 524{
@@ -760,9 +760,8 @@ static int cb_pcidas_detach(struct comedi_device *dev)
760 if (dev->subdevices) 760 if (dev->subdevices)
761 subdev_8255_cleanup(dev, dev->subdevices + 2); 761 subdev_8255_cleanup(dev, dev->subdevices + 2);
762 if (devpriv && devpriv->pci_dev) { 762 if (devpriv && devpriv->pci_dev) {
763 if (devpriv->s5933_config) { 763 if (devpriv->s5933_config)
764 comedi_pci_disable(devpriv->pci_dev); 764 comedi_pci_disable(devpriv->pci_dev);
765 }
766 pci_dev_put(devpriv->pci_dev); 765 pci_dev_put(devpriv->pci_dev);
767 } 766 }
768 767
@@ -1248,9 +1247,8 @@ static int cb_pcidas_ai_cmd(struct comedi_device *dev,
1248 cmd->flags & TRIG_ROUND_MASK); 1247 cmd->flags & TRIG_ROUND_MASK);
1249 1248
1250 /* set number of conversions */ 1249 /* set number of conversions */
1251 if (cmd->stop_src == TRIG_COUNT) { 1250 if (cmd->stop_src == TRIG_COUNT)
1252 devpriv->count = cmd->chanlist_len * cmd->stop_arg; 1251 devpriv->count = cmd->chanlist_len * cmd->stop_arg;
1253 }
1254 /* enable interrupts */ 1252 /* enable interrupts */
1255 spin_lock_irqsave(&dev->spinlock, flags); 1253 spin_lock_irqsave(&dev->spinlock, flags);
1256 devpriv->adc_fifo_bits |= INTE; 1254 devpriv->adc_fifo_bits |= INTE;
@@ -1449,9 +1447,8 @@ static int cb_pcidas_ao_cmd(struct comedi_device *dev,
1449 devpriv->ao_divisor2, 2); 1447 devpriv->ao_divisor2, 2);
1450 } 1448 }
1451 /* set number of conversions */ 1449 /* set number of conversions */
1452 if (cmd->stop_src == TRIG_COUNT) { 1450 if (cmd->stop_src == TRIG_COUNT)
1453 devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg; 1451 devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg;
1454 }
1455 /* set pacer source */ 1452 /* set pacer source */
1456 spin_lock_irqsave(&dev->spinlock, flags); 1453 spin_lock_irqsave(&dev->spinlock, flags);
1457 switch (cmd->scan_begin_src) { 1454 switch (cmd->scan_begin_src) {
@@ -1494,9 +1491,8 @@ static int cb_pcidas_ao_inttrig(struct comedi_device *dev,
1494 num_points * sizeof(short)); 1491 num_points * sizeof(short));
1495 num_points = num_bytes / sizeof(short); 1492 num_points = num_bytes / sizeof(short);
1496 1493
1497 if (cmd->stop_src == TRIG_COUNT) { 1494 if (cmd->stop_src == TRIG_COUNT)
1498 devpriv->ao_count -= num_points; 1495 devpriv->ao_count -= num_points;
1499 }
1500 /* write data to board's fifo */ 1496 /* write data to board's fifo */
1501 outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, num_bytes); 1497 outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, num_bytes);
1502 1498
@@ -1534,9 +1530,8 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
1534 static const int timeout = 10000; 1530 static const int timeout = 10000;
1535 unsigned long flags; 1531 unsigned long flags;
1536 1532
1537 if (dev->attached == 0) { 1533 if (dev->attached == 0)
1538 return IRQ_NONE; 1534 return IRQ_NONE;
1539 }
1540 1535
1541 async = s->async; 1536 async = s->async;
1542 async->events = 0; 1537 async->events = 0;
@@ -1558,15 +1553,13 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
1558 1553
1559 status = inw(devpriv->control_status + INT_ADCFIFO); 1554 status = inw(devpriv->control_status + INT_ADCFIFO);
1560#ifdef CB_PCIDAS_DEBUG 1555#ifdef CB_PCIDAS_DEBUG
1561 if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) { 1556 if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0)
1562 comedi_error(dev, "spurious interrupt"); 1557 comedi_error(dev, "spurious interrupt");
1563 }
1564#endif 1558#endif
1565 1559
1566 /* check for analog output interrupt */ 1560 /* check for analog output interrupt */
1567 if (status & (DAHFI | DAEMI)) { 1561 if (status & (DAHFI | DAEMI))
1568 handle_ao_interrupt(dev, status); 1562 handle_ao_interrupt(dev, status);
1569 }
1570 /* check for analog input interrupts */ 1563 /* check for analog input interrupts */
1571 /* if fifo half-full */ 1564 /* if fifo half-full */
1572 if (status & ADHFI) { 1565 if (status & ADHFI) {
@@ -1675,9 +1668,8 @@ static void handle_ao_interrupt(struct comedi_device *dev, unsigned int status)
1675 num_points * sizeof(short)); 1668 num_points * sizeof(short));
1676 num_points = num_bytes / sizeof(short); 1669 num_points = num_bytes / sizeof(short);
1677 1670
1678 if (async->cmd.stop_src == TRIG_COUNT) { 1671 if (async->cmd.stop_src == TRIG_COUNT)
1679 devpriv->ao_count -= num_points; 1672 devpriv->ao_count -= num_points;
1680 }
1681 /* write data to board's fifo */ 1673 /* write data to board's fifo */
1682 outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, 1674 outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer,
1683 num_points); 1675 num_points);
@@ -1852,7 +1844,7 @@ static int wait_for_nvram_ready(unsigned long s5933_base_addr)
1852} 1844}
1853 1845
1854static int nvram_read(struct comedi_device *dev, unsigned int address, 1846static int nvram_read(struct comedi_device *dev, unsigned int address,
1855 uint8_t * data) 1847 uint8_t *data)
1856{ 1848{
1857 unsigned long iobase = devpriv->s5933_config; 1849 unsigned long iobase = devpriv->s5933_config;
1858 1850