diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-07-22 01:50:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-22 20:01:12 -0400 |
commit | 781223a15c510b4cb11328603bfc41ec8352f015 (patch) | |
tree | 7740c40ddf8bcccaf81788c785781a10c618d545 | |
parent | ccbae55e1c6dc18e95d72c044cf9345ea08abf7b (diff) |
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>
-rw-r--r-- | drivers/net/wan/sbni.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index 40e95facdb6c..86127bcc9f7a 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c | |||
@@ -303,7 +303,6 @@ sbni_pci_probe( struct net_device *dev ) | |||
303 | != NULL ) { | 303 | != NULL ) { |
304 | int pci_irq_line; | 304 | int pci_irq_line; |
305 | unsigned long pci_ioaddr; | 305 | unsigned long pci_ioaddr; |
306 | u16 subsys; | ||
307 | 306 | ||
308 | if( pdev->vendor != SBNI_PCI_VENDOR && | 307 | if( pdev->vendor != SBNI_PCI_VENDOR && |
309 | pdev->device != SBNI_PCI_DEVICE ) | 308 | pdev->device != SBNI_PCI_DEVICE ) |
@@ -314,9 +313,7 @@ sbni_pci_probe( struct net_device *dev ) | |||
314 | 313 | ||
315 | /* Avoid already found cards from previous calls */ | 314 | /* Avoid already found cards from previous calls */ |
316 | if( !request_region( pci_ioaddr, SBNI_IO_EXTENT, dev->name ) ) { | 315 | if( !request_region( pci_ioaddr, SBNI_IO_EXTENT, dev->name ) ) { |
317 | pci_read_config_word( pdev, PCI_SUBSYSTEM_ID, &subsys ); | 316 | if (pdev->subsystem_device != 2) |
318 | |||
319 | if (subsys != 2) | ||
320 | continue; | 317 | continue; |
321 | 318 | ||
322 | /* Dual adapter is present */ | 319 | /* Dual adapter is present */ |