diff options
author | Michael Hunold <devnull@localhost> | 2004-09-18 17:06:01 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2004-09-18 17:06:01 +0000 |
commit | 1661b1d355df10730a3f6283df65b3a020ef6e66 (patch) | |
tree | 9ba27f3e524087d8f9e51b37bc4fa94be13e2765 /linux/drivers/media/dvb/bt8xx | |
parent | dc34bf5ddd262cbb5fc16f93adc59f84c406ddf0 (diff) | |
download | mediapointer-dvb-s2-1661b1d355df10730a3f6283df65b3a020ef6e66.tar.gz mediapointer-dvb-s2-1661b1d355df10730a3f6283df65b3a020ef6e66.tar.bz2 |
More stuff backfeeded from mailine:
- shiffe pci_enable_device() and pci_disable_device() around
Diffstat (limited to 'linux/drivers/media/dvb/bt8xx')
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/bt878.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/bt878.c b/linux/drivers/media/dvb/bt8xx/bt878.c index 1fdcabcfe..4a6286a8a 100644 --- a/linux/drivers/media/dvb/bt8xx/bt878.c +++ b/linux/drivers/media/dvb/bt8xx/bt878.c @@ -412,6 +412,8 @@ static int __devinit bt878_probe(struct pci_dev *dev, printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", bt878_num); + if (pci_enable_device(dev)) + return -EIO; bt = &bt878[bt878_num]; bt->dev = dev; @@ -421,11 +423,10 @@ static int __devinit bt878_probe(struct pci_dev *dev, bt->id = dev->device; bt->irq = dev->irq; bt->bt878_adr = pci_resource_start(dev, 0); - if (pci_enable_device(dev)) - return -EIO; if (!request_mem_region(pci_resource_start(dev, 0), pci_resource_len(dev, 0), "bt878")) { - return -EBUSY; + result = -EBUSY; + goto fail0; } pci_read_config_byte(dev, PCI_CLASS_REVISION, &bt->revision); @@ -496,6 +497,8 @@ static int __devinit bt878_probe(struct pci_dev *dev, fail1: release_mem_region(pci_resource_start(bt->dev, 0), pci_resource_len(bt->dev, 0)); + fail0: + pci_disable_device(dev); return result; } @@ -512,7 +515,7 @@ static void __devexit bt878_remove(struct pci_dev *pci_dev) /* first disable interrupts before unmapping the memory! */ btwrite(0, BT878_AINT_MASK); - btwrite(~0x0UL, BT878_AINT_STAT); + btwrite(~0U, BT878_AINT_STAT); /* disable PCI bus-mastering */ pci_read_config_byte(bt->dev, PCI_COMMAND, &command); @@ -535,6 +538,7 @@ static void __devexit bt878_remove(struct pci_dev *pci_dev) bt878_mem_free(bt); pci_set_drvdata(pci_dev, NULL); + pci_disable_device(pci_dev); return; } |