Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318106
b: refs/heads/master
c: ad196be
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 19, 2012
1 parent 37e0e19 commit 37e7f29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: f55354b0a8a3c6d3e5fc64b3da37510711aaf352
refs/heads/master: ad196be73d4c5fd433cec22a306dcbab3fc7e25c
15 changes: 8 additions & 7 deletions trunk/drivers/staging/comedi/drivers/daqboard2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ struct daqboard2000_private {
enum {
card_daqboard_2000
} card;
struct pci_dev *pci_dev;
void *daq;
void *plx;
unsigned int ao_readback[2];
Expand Down Expand Up @@ -751,7 +750,7 @@ static int daqboard2000_attach(struct comedi_device *dev,
pcidev = daqboard2000_find_pci_dev(dev, it);
if (!pcidev)
return -EIO;
devpriv->pci_dev = pcidev;
comedi_set_hw_dev(dev, &pcidev->dev);

result = comedi_pci_enable(pcidev, "daqboard2000");
if (result < 0) {
Expand Down Expand Up @@ -833,6 +832,8 @@ static int daqboard2000_attach(struct comedi_device *dev,

static void daqboard2000_detach(struct comedi_device *dev)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);

if (dev->subdevices)
subdev_8255_cleanup(dev, dev->subdevices + 2);
if (dev->irq)
Expand All @@ -842,11 +843,11 @@ static void daqboard2000_detach(struct comedi_device *dev)
iounmap(devpriv->daq);
if (devpriv->plx)
iounmap(devpriv->plx);
if (devpriv->pci_dev) {
if (dev->iobase)
comedi_pci_disable(devpriv->pci_dev);
pci_dev_put(devpriv->pci_dev);
}
}
if (pcidev) {
if (dev->iobase)
comedi_pci_disable(pcidev);
pci_dev_put(pcidev);
}
}

Expand Down

0 comments on commit 37e7f29

Please sign in to comment.