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'... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ccbae55e1c
commit
781223a15c
@ -303,7 +303,6 @@ sbni_pci_probe( struct net_device *dev )
|
|||||||
!= NULL ) {
|
!= NULL ) {
|
||||||
int pci_irq_line;
|
int pci_irq_line;
|
||||||
unsigned long pci_ioaddr;
|
unsigned long pci_ioaddr;
|
||||||
u16 subsys;
|
|
||||||
|
|
||||||
if( pdev->vendor != SBNI_PCI_VENDOR &&
|
if( pdev->vendor != SBNI_PCI_VENDOR &&
|
||||||
pdev->device != SBNI_PCI_DEVICE )
|
pdev->device != SBNI_PCI_DEVICE )
|
||||||
@ -314,9 +313,7 @@ sbni_pci_probe( struct net_device *dev )
|
|||||||
|
|
||||||
/* Avoid already found cards from previous calls */
|
/* Avoid already found cards from previous calls */
|
||||||
if( !request_region( pci_ioaddr, SBNI_IO_EXTENT, dev->name ) ) {
|
if( !request_region( pci_ioaddr, SBNI_IO_EXTENT, dev->name ) ) {
|
||||||
pci_read_config_word( pdev, PCI_SUBSYSTEM_ID, &subsys );
|
if (pdev->subsystem_device != 2)
|
||||||
|
|
||||||
if (subsys != 2)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Dual adapter is present */
|
/* Dual adapter is present */
|
||||||
|
Loading…
Reference in New Issue
Block a user