]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
sbni: use pci_dev->subsystem_device
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Fri, 22 Jul 2011 05:50:25 +0000 (05:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 Jul 2011 00:01:12 +0000 (17:01 -0700)
The driver reads PCI subsystem ID from the PCI configuration register while it's
already stored by the PCI subsystem in the 'subsystem_device' field of 'struct
pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/sbni.c

index 40e95facdb6c2f05d186d35e206a1cc61067f763..86127bcc9f7a63a504784e6a779b14582bb731c9 100644 (file)
@@ -303,7 +303,6 @@ sbni_pci_probe( struct net_device  *dev )
               != NULL ) {
                int  pci_irq_line;
                unsigned long  pci_ioaddr;
-               u16  subsys;
 
                if( pdev->vendor != SBNI_PCI_VENDOR &&
                    pdev->device != SBNI_PCI_DEVICE )
@@ -314,9 +313,7 @@ sbni_pci_probe( struct net_device  *dev )
 
                /* Avoid already found cards from previous calls */
                if( !request_region( pci_ioaddr, SBNI_IO_EXTENT, dev->name ) ) {
-                       pci_read_config_word( pdev, PCI_SUBSYSTEM_ID, &subsys );
-
-                       if (subsys != 2)
+                       if (pdev->subsystem_device != 2)
                                continue;
 
                        /* Dual adapter is present */