linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Sun, 09 Jan 2005 23:59:43 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/01/09 23:59:36

Modified files:
        include/asm-mips/mach-generic: ide.h 

Log message:
        Decrement the reference counter again.

diff -urN linux/include/asm-mips/mach-generic/ide.h 
linux/include/asm-mips/mach-generic/ide.h
--- linux/include/asm-mips/mach-generic/ide.h   2004/12/21 10:50:01     1.7
+++ linux/include/asm-mips/mach-generic/ide.h   2005/01/09 23:59:36     1.8
@@ -32,8 +32,14 @@
 static __inline__ int ide_probe_legacy(void)
 {
 #ifdef CONFIG_PCI
-       return (pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL) != NULL) ||
-              (pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL) != NULL);
+       struct pci_dev *dev;
+       if ((dev = pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL)) != NULL ||
+           (dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL)) != NULL) {
+               pci_dev_put(dev);
+
+               return 1;
+       }
+       return 0;
 #elif defined(CONFIG_EISA) || defined(CONFIG_ISA)
        return 1;
 #else

<Prev in Thread] Current Thread [Next in Thread>