* [PATCH] sbni: use pci_dev->subsystem_device
@ 2011-07-22 15:50 Sergei Shtylyov
2011-07-23 0:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2011-07-22 15:50 UTC (permalink / raw)
To: netdev
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>
---
The patch is against the recent Linus' tree.
drivers/net/wan/sbni.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Index: linux-2.6/drivers/net/wan/sbni.c
===================================================================
--- linux-2.6.orig/drivers/net/wan/sbni.c
+++ 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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sbni: use pci_dev->subsystem_device
2011-07-22 15:50 [PATCH] sbni: use pci_dev->subsystem_device Sergei Shtylyov
@ 2011-07-23 0:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-07-23 0:15 UTC (permalink / raw)
To: sshtylyov; +Cc: netdev
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Date: Fri, 22 Jul 2011 19:50:25 +0400
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-23 0:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 15:50 [PATCH] sbni: use pci_dev->subsystem_device Sergei Shtylyov
2011-07-23 0:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).