Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196964
b: refs/heads/master
c: f4af236
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Schick authored and Greg Kroah-Hartman committed May 11, 2010
1 parent f09c01d commit ab40e67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 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: d4a505e81bffe8c41b3b701f8fa7b47c902fb149
refs/heads/master: f4af2361dfb750c746047e21d186df8705d1fd5d
21 changes: 7 additions & 14 deletions trunk/drivers/staging/comedi/drivers/dt3000.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,8 @@ static int dt3k_send_cmd(struct comedi_device *dev, unsigned int cmd)
break;
udelay(1);
}
if ((status & DT3000_COMPLETION_MASK) == DT3000_NOERROR) {
if ((status & DT3000_COMPLETION_MASK) == DT3000_NOERROR)
return 0;
}

printk("dt3k_send_cmd() timeout/error status=0x%04x\n", status);

Expand Down Expand Up @@ -359,9 +358,8 @@ static irqreturn_t dt3k_interrupt(int irq, void *d)
struct comedi_subdevice *s;
unsigned int status;

if (!dev->attached) {
if (!dev->attached)
return IRQ_NONE;
}

s = dev->subdevices + 0;
status = readw(devpriv->io_addr + DPR_Intr_Flag);
Expand All @@ -374,9 +372,8 @@ static irqreturn_t dt3k_interrupt(int irq, void *d)
s->async->events |= COMEDI_CB_BLOCK;
}

if (status & (DT3000_ADSWERR | DT3000_ADHWERR)) {
if (status & (DT3000_ADSWERR | DT3000_ADHWERR))
s->async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
}

debug_n_ints++;
if (debug_n_ints >= 10) {
Expand All @@ -399,9 +396,8 @@ static void debug_intr_flags(unsigned int flags)
int i;
printk("dt3k: intr_flags:");
for (i = 0; i < 8; i++) {
if (flags & (1 << i)) {
if (flags & (1 << i))
printk(" %s", intr_flags[i]);
}
}
printk("\n");
}
Expand Down Expand Up @@ -690,9 +686,8 @@ static int dt3k_ai_insn(struct comedi_device *dev, struct comedi_subdevice *s,
/* XXX docs don't explain how to select aref */
aref = CR_AREF(insn->chanspec);

for (i = 0; i < insn->n; i++) {
for (i = 0; i < insn->n; i++)
data[i] = dt3k_readsingle(dev, SUBS_AI, chan, gain);
}

return i;
}
Expand Down Expand Up @@ -720,9 +715,8 @@ static int dt3k_ao_insn_read(struct comedi_device *dev,
unsigned int chan;

chan = CR_CHAN(insn->chanspec);
for (i = 0; i < insn->n; i++) {
for (i = 0; i < insn->n; i++)
data[i] = devpriv->ao_readback[chan];
}

return i;
}
Expand Down Expand Up @@ -911,9 +905,8 @@ static int dt3000_detach(struct comedi_device *dev)

if (devpriv) {
if (devpriv->pci_dev) {
if (devpriv->phys_addr) {
if (devpriv->phys_addr)
comedi_pci_disable(devpriv->pci_dev);
}
pci_dev_put(devpriv->pci_dev);
}
if (devpriv->io_addr)
Expand Down

0 comments on commit ab40e67

Please sign in to comment.