|
@@ -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,
|
|
|
uint8_t value);
|
|
|
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)
|
|
|
{
|
|
@@ -760,9 +760,8 @@ static int cb_pcidas_detach(struct comedi_device *dev)
|
|
|
if (dev->subdevices)
|
|
|
subdev_8255_cleanup(dev, dev->subdevices + 2);
|
|
|
if (devpriv && devpriv->pci_dev) {
|
|
|
- if (devpriv->s5933_config) {
|
|
|
+ if (devpriv->s5933_config)
|
|
|
comedi_pci_disable(devpriv->pci_dev);
|
|
|
- }
|
|
|
pci_dev_put(devpriv->pci_dev);
|
|
|
}
|
|
|
|
|
@@ -1248,9 +1247,8 @@ static int cb_pcidas_ai_cmd(struct comedi_device *dev,
|
|
|
cmd->flags & TRIG_ROUND_MASK);
|
|
|
|
|
|
/* set number of conversions */
|
|
|
- if (cmd->stop_src == TRIG_COUNT) {
|
|
|
+ if (cmd->stop_src == TRIG_COUNT)
|
|
|
devpriv->count = cmd->chanlist_len * cmd->stop_arg;
|
|
|
- }
|
|
|
/* enable interrupts */
|
|
|
spin_lock_irqsave(&dev->spinlock, flags);
|
|
|
devpriv->adc_fifo_bits |= INTE;
|
|
@@ -1449,9 +1447,8 @@ static int cb_pcidas_ao_cmd(struct comedi_device *dev,
|
|
|
devpriv->ao_divisor2, 2);
|
|
|
}
|
|
|
/* 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;
|
|
|
- }
|
|
|
/* set pacer source */
|
|
|
spin_lock_irqsave(&dev->spinlock, flags);
|
|
|
switch (cmd->scan_begin_src) {
|
|
@@ -1494,9 +1491,8 @@ static int cb_pcidas_ao_inttrig(struct comedi_device *dev,
|
|
|
num_points * 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;
|
|
|
- }
|
|
|
/* write data to board's fifo */
|
|
|
outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, num_bytes);
|
|
|
|
|
@@ -1534,9 +1530,8 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
|
|
|
static const int timeout = 10000;
|
|
|
unsigned long flags;
|
|
|
|
|
|
- if (dev->attached == 0) {
|
|
|
+ if (dev->attached == 0)
|
|
|
return IRQ_NONE;
|
|
|
- }
|
|
|
|
|
|
async = s->async;
|
|
|
async->events = 0;
|
|
@@ -1558,15 +1553,13 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
|
|
|
|
|
|
status = inw(devpriv->control_status + INT_ADCFIFO);
|
|
|
#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");
|
|
|
- }
|
|
|
#endif
|
|
|
|
|
|
/* check for analog output interrupt */
|
|
|
- if (status & (DAHFI | DAEMI)) {
|
|
|
+ if (status & (DAHFI | DAEMI))
|
|
|
handle_ao_interrupt(dev, status);
|
|
|
- }
|
|
|
/* check for analog input interrupts */
|
|
|
/* if fifo half-full */
|
|
|
if (status & ADHFI) {
|
|
@@ -1675,9 +1668,8 @@ static void handle_ao_interrupt(struct comedi_device *dev, unsigned int status)
|
|
|
num_points * 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;
|
|
|
- }
|
|
|
/* write data to board's fifo */
|
|
|
outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer,
|
|
|
num_points);
|
|
@@ -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,
|
|
|
- uint8_t * data)
|
|
|
+ uint8_t *data)
|
|
|
{
|
|
|
unsigned long iobase = devpriv->s5933_config;
|
|
|
|