fedora core 2.6.10-1.12-FC2
[linux-2.6.git] / drivers / net / wan / sbni.c
index 311ac34..3457842 100644 (file)
@@ -294,7 +294,7 @@ sbni_pci_probe( struct net_device  *dev )
 {
        struct pci_dev  *pdev = NULL;
 
-       while( (pdev = pci_find_class( PCI_CLASS_NETWORK_OTHER << 8, pdev ))
+       while( (pdev = pci_get_class( PCI_CLASS_NETWORK_OTHER << 8, pdev ))
               != NULL ) {
                int  pci_irq_line;
                unsigned long  pci_ioaddr;
@@ -331,10 +331,14 @@ sbni_pci_probe( struct net_device  *dev )
                /* avoiding re-enable dual adapters */
                if( (pci_ioaddr & 7) == 0  &&  pci_enable_device( pdev ) ) {
                        release_region( pci_ioaddr, SBNI_IO_EXTENT );
+                       pci_dev_put( pdev );
                        return  -EIO;
                }
                if( sbni_probe1( dev, pci_ioaddr, pci_irq_line ) ) {
                        SET_NETDEV_DEV(dev, &pdev->dev);
+                       /* not the best thing to do, but this is all messed up 
+                          for hotplug systems anyway... */
+                       pci_dev_put( pdev );
                        return  0;
                }
        }
@@ -349,7 +353,7 @@ sbni_probe1( struct net_device  *dev,  unsigned long  ioaddr,  int  irq )
 
        if( sbni_card_probe( ioaddr ) ) {
                release_region( ioaddr, SBNI_IO_EXTENT );
-               return  0;
+               return NULL;
        }
 
        outb( 0, ioaddr + CSR0 );
@@ -368,7 +372,7 @@ sbni_probe1( struct net_device  *dev,  unsigned long  ioaddr,  int  irq )
                        printk( KERN_ERR "%s: can't detect device irq!\n",
                                dev->name );
                        release_region( ioaddr, SBNI_IO_EXTENT );
-                       return  0;
+                       return NULL;
                }
        } else if( irq == 2 )
                irq = 9;
@@ -381,7 +385,7 @@ sbni_probe1( struct net_device  *dev,  unsigned long  ioaddr,  int  irq )
        if( !nl ) {
                printk( KERN_ERR "%s: unable to get memory!\n", dev->name );
                release_region( ioaddr, SBNI_IO_EXTENT );
-               return  0;
+               return NULL;
        }
 
        dev->priv = nl;
@@ -1578,7 +1582,7 @@ calc_crc32( u32  crc,  u8  *p,  u32  len )
        register u32  _crc;
        _crc = crc;
        
-       __asm __volatile (
+       __asm__ __volatile__ (
                "xorl   %%ebx, %%ebx\n"
                "movl   %2, %%esi\n" 
                "movl   %3, %%ecx\n"