Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318105
b: refs/heads/master
c: f55354b
h: refs/heads/master
i:
  318103: d138b94
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 19, 2012
1 parent a8657c4 commit 37e0e19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: f34ec8002b685e865e26c384887b90149949c5bf
refs/heads/master: f55354b0a8a3c6d3e5fc64b3da37510711aaf352
9 changes: 4 additions & 5 deletions trunk/drivers/staging/comedi/drivers/daqboard2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ struct daqboard2000_private {
struct pci_dev *pci_dev;
void *daq;
void *plx;
int got_regions;
unsigned int ao_readback[2];
};

Expand Down Expand Up @@ -760,11 +759,11 @@ static int daqboard2000_attach(struct comedi_device *dev,
"failed to enable PCI device and request regions\n");
return -EIO;
}
devpriv->got_regions = 1;
dev->iobase = pci_resource_start(pcidev, 2);

devpriv->plx =
ioremap(pci_resource_start(pcidev, 0), DAQBOARD2000_PLX_SIZE);
devpriv->daq =
ioremap(pci_resource_start(pcidev, 2), DAQBOARD2000_DAQ_SIZE);
devpriv->daq = ioremap(dev->iobase, DAQBOARD2000_DAQ_SIZE);
if (!devpriv->plx || !devpriv->daq)
return -ENOMEM;

Expand Down Expand Up @@ -844,7 +843,7 @@ static void daqboard2000_detach(struct comedi_device *dev)
if (devpriv->plx)
iounmap(devpriv->plx);
if (devpriv->pci_dev) {
if (devpriv->got_regions)
if (dev->iobase)
comedi_pci_disable(devpriv->pci_dev);
pci_dev_put(devpriv->pci_dev);
}
Expand Down

0 comments on commit 37e0e19

Please sign in to comment.