PATCH: trident , pci_enable_device moved

Marcus Meissner (Marcus.Meissner@caldera.de)
Wed, 25 Apr 2001 09:04:38 +0200


Hi Alan, linux-kernel,

This moves pci_enable_device() in trident.c before any PCI resource access.
Everything else appears to be ok in regards to 2.4 PCI API and return values.

Ciao, Marcus

Index: trident.c
===================================================================
RCS file: /build/mm/work/repository/linux-mm/drivers/sound/trident.c,v
retrieving revision 1.12
diff -u -r1.12 trident.c
--- trident.c 2001/04/24 09:47:13 1.12
+++ trident.c 2001/04/24 10:19:36
@@ -3309,6 +3309,9 @@
struct trident_card *card;
u8 revision;

+ if (pci_enable_device(pci_dev))
+ return -ENODEV;
+
if (pci_set_dma_mask(pci_dev, TRIDENT_DMA_MASK)) {
printk(KERN_ERR "trident: architecture does not support"
" 30bit PCI busmaster DMA\n");
@@ -3322,9 +3325,6 @@
iobase);
return -ENODEV;
}
-
- if (pci_enable_device(pci_dev))
- return -ENODEV;

if ((card = kmalloc(sizeof(struct trident_card), GFP_KERNEL)) == NULL) {
printk(KERN_ERR "trident: out of memory\n");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/