Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281108
b: refs/heads/master
c: 352f917
h: refs/heads/master
v: v3
  • Loading branch information
Ravishankar karkala Mallikarjunayya authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent 1519167 commit 71cc963
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 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: 61a8d9550e620ab777ce25c2878e57f4e1a6acd3
refs/heads/master: 352f91747f670b3d82601e7a518df13ba6ecb5e4
20 changes: 8 additions & 12 deletions trunk/drivers/staging/comedi/drivers/daqboard2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,19 +657,17 @@ static void daqboard2000_activateReferenceDacs(struct comedi_device *dev)
/* Set the + reference dac value in the FPGA */
fpga->refDacs = 0x80 | DAQBOARD2000_PosRefDacSelect;
for (timeout = 0; timeout < 20; timeout++) {
if ((fpga->dacControl & DAQBOARD2000_RefBusy) == 0) {
if ((fpga->dacControl & DAQBOARD2000_RefBusy) == 0)
break;
}
udelay(2);
}
/* printk("DAQBOARD2000_PosRefDacSelect %d\n", timeout);*/

/* Set the - reference dac value in the FPGA */
fpga->refDacs = 0x80 | DAQBOARD2000_NegRefDacSelect;
for (timeout = 0; timeout < 20; timeout++) {
if ((fpga->dacControl & DAQBOARD2000_RefBusy) == 0) {
if ((fpga->dacControl & DAQBOARD2000_RefBusy) == 0)
break;
}
udelay(2);
}
/* printk("DAQBOARD2000_NegRefDacSelect %d\n", timeout);*/
Expand Down Expand Up @@ -742,9 +740,9 @@ static int daqboard2000_attach(struct comedi_device *dev,
slot = it->options[1];

result = alloc_private(dev, sizeof(struct daqboard2000_private));
if (result < 0) {
if (result < 0)
return -ENOMEM;
}

for (card = pci_get_device(0x1616, 0x0409, NULL);
card != NULL; card = pci_get_device(0x1616, 0x0409, card)) {
if (bus || slot) {
Expand Down Expand Up @@ -793,9 +791,8 @@ static int daqboard2000_attach(struct comedi_device *dev,
ioremap(pci_resource_start(card, 0), DAQBOARD2000_PLX_SIZE);
devpriv->daq =
ioremap(pci_resource_start(card, 2), DAQBOARD2000_DAQ_SIZE);
if (!devpriv->plx || !devpriv->daq) {
if (!devpriv->plx || !devpriv->daq)
return -ENOMEM;
}

result = alloc_subdevices(dev, 3);
if (result < 0)
Expand Down Expand Up @@ -868,18 +865,17 @@ static int daqboard2000_detach(struct comedi_device *dev)
if (dev->subdevices)
subdev_8255_cleanup(dev, dev->subdevices + 2);

if (dev->irq) {
if (dev->irq)
free_irq(dev->irq, dev);
}

if (devpriv) {
if (devpriv->daq)
iounmap(devpriv->daq);
if (devpriv->plx)
iounmap(devpriv->plx);
if (devpriv->pci_dev) {
if (devpriv->got_regions) {
if (devpriv->got_regions)
comedi_pci_disable(devpriv->pci_dev);
}
pci_dev_put(devpriv->pci_dev);
}
}
Expand Down

0 comments on commit 71cc963

Please sign in to comment.