Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186832
b: refs/heads/master
c: 2d238b2
h: refs/heads/master
v: v3
  • Loading branch information
Andrea Gelmini authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent d41088a commit 2f16c3d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 882e1233a1abb650149496b33eaeb1d09bbc0b7a
refs/heads/master: 2d238b2972bf365153ae8d699177c7a19a5f3056
28 changes: 10 additions & 18 deletions trunk/drivers/staging/comedi/drivers/cb_pcidas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand All @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 2f16c3d

Please sign in to comment.