Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363510
b: refs/heads/master
c: 00ca688
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent 5b3d39e commit 092ac4e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 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: 13f12b5aea501bce146cdf213d1819083aadc847
refs/heads/master: 00ca6884186f18a758eae37e94f7c3c0527f8f30
5 changes: 4 additions & 1 deletion trunk/drivers/staging/comedi/comedi_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ int comedi_pci_enable(struct comedi_device *dev)
: dev->driver->driver_name);
if (rc < 0)
pci_disable_device(pcidev);
else
dev->ioenabled = true;

return rc;
}
Expand All @@ -68,10 +70,11 @@ void comedi_pci_disable(struct comedi_device *dev)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);

if (pcidev && dev->iobase) {
if (pcidev && dev->ioenabled) {
pci_release_regions(pcidev);
pci_disable_device(pcidev);
}
dev->ioenabled = false;
}
EXPORT_SYMBOL_GPL(comedi_pci_disable);

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/comedi/comedidev.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ struct comedi_device {
const void *board_ptr;
bool attached:1;
bool in_request_module:1;
bool ioenabled:1;
spinlock_t spinlock;
struct mutex mutex;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ static void cleanup_device(struct comedi_device *dev)
dev->board_name = NULL;
dev->board_ptr = NULL;
dev->iobase = 0;
dev->ioenabled = false;
dev->irq = 0;
dev->read_subdev = NULL;
dev->write_subdev = NULL;
Expand Down

0 comments on commit 092ac4e

Please sign in to comment.