Skip to content

Commit

Permalink
sbni: use pci_dev->subsystem_device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergei Shtylyov authored and David S. Miller committed Jul 23, 2011
1 parent ccbae55 commit 781223a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/wan/sbni.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -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 */
Expand Down

0 comments on commit 781223a

Please sign in to comment.