patch-2.3.99-pre7 linux/drivers/sound/i810_audio.c
Next file: linux/drivers/sound/mad16.c
Previous file: linux/drivers/sound/esssolo1.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Wed May 10 16:57:18 2000
- Orig file:
v2.3.99-pre6/linux/drivers/sound/i810_audio.c
- Orig date:
Wed Apr 26 16:34:08 2000
diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/sound/i810_audio.c linux/drivers/sound/i810_audio.c
@@ -924,7 +924,10 @@
status = inl(card->iobase + GLOB_STA);
if(!(status & INT_MASK))
+ {
+ spin_unlock(&card->lock);
return; /* not for us */
+ }
// printk("Interrupt %X: ", status);
if(status & (INT_PO|INT_PI|INT_MC))
@@ -1735,14 +1738,16 @@
return -ENODEV;
}
+ if (pci_enable_device(pci_dev))
+ return -EIO;
if ((card = kmalloc(sizeof(struct i810_card), GFP_KERNEL)) == NULL) {
printk(KERN_ERR "i810_audio: out of memory\n");
return -ENOMEM;
}
memset(card, 0, sizeof(*card));
- card->iobase = pci_dev->resource[1].start;
- card->ac97base = pci_dev->resource[0].start;
+ card->iobase = pci_resource_start (pci_dev, 1);
+ card->ac97base = pci_resource_start (pci_dev, 0);
card->pci_dev = pci_dev;
card->pci_id = pci_id->device;
card->irq = pci_dev->irq;
@@ -1752,7 +1757,6 @@
devs = card;
pci_set_master(pci_dev);
- pci_enable_device(pci_dev);
printk(KERN_INFO "i810: %s found at IO 0x%04lx and 0x%04lx, IRQ %d\n",
card_names[pci_id->driver_data], card->iobase, card->ac97base,
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen (who was at: [email protected])