Skip to contentSkip to conversation

sbni: use pci_dev->subsystem_device

PATCH Applied Sergei Shtylyov 2 participants 2 messages Jul 22, 2011 – Jul 23, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sbni: use pci_dev->subsystem_device

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'...

---
The patch is against the recent Linus' tree.

 drivers/net/wan/sbni.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/wan/sbni.c +1 -4
Index: linux-2.6/drivers/net/wan/sbni.c
===================================================================
@@ -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 */
maintainer Applied
#1 lore raw

From: Sergei Shtylyov <[email protected]>
Date: Fri, 22 Jul 2011 19:50:25 +0400

Quoted 5 lines

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'...

Applied.