Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318058
b: refs/heads/master
c: cc04c8a
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 19, 2012
1 parent 7597708 commit f920e2e
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 3dbd666ca4e3c6e6d19101781a62555d0210ff57
refs/heads/master: cc04c8a5fc82bd284f7f791869a7f9c0bfb528b5
10 changes: 5 additions & 5 deletions trunk/drivers/staging/comedi/drivers/adv_pci1723.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,7 @@ static struct pci_dev *pci1723_find_pci_dev(struct comedi_device *dev,
}
if (pcidev->vendor != PCI_VENDOR_ID_ADVANTECH)
continue;
/*
* Look for device that isn't in use.
* Enable PCI device and request regions.
*/
if (comedi_pci_enable(pcidev, "adv_pci1723"))
if (pci_is_enabled(pcidev))
continue;
return pcidev;
}
Expand Down Expand Up @@ -335,6 +331,10 @@ static int pci1723_attach(struct comedi_device *dev,
if (!devpriv->pcidev)
return -EIO;

ret = comedi_pci_enable(devpriv->pcidev, "adv_pci1723");
if (ret)
return ret;

dev->iobase = pci_resource_start(devpriv->pcidev, 2);

dev->board_name = this_board->name;
Expand Down

0 comments on commit f920e2e

Please sign in to comment.