netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3 v2] ssb: use pci_dev->subsystem_{vendor,device}
@ 2011-07-01 18:34 Sergei Shtylyov
  2011-07-05 19:34 ` John W. Linville
  0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2011-07-01 18:34 UTC (permalink / raw)
  To: mb, netdev

The SSB code reads PCI subsystem IDs from the PCI configuration registers while
they are already stored by the PCI subsystem in the 'subsystem_{vendor|device}'
fields of 'struct pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

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

 drivers/ssb/pci.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Index: linux-2.6/drivers/ssb/pci.c
===================================================================
--- linux-2.6.orig/drivers/ssb/pci.c
+++ linux-2.6/drivers/ssb/pci.c
@@ -734,10 +734,8 @@ out_free:
 static void ssb_pci_get_boardinfo(struct ssb_bus *bus,
 				  struct ssb_boardinfo *bi)
 {
-	pci_read_config_word(bus->host_pci, PCI_SUBSYSTEM_VENDOR_ID,
-			     &bi->vendor);
-	pci_read_config_word(bus->host_pci, PCI_SUBSYSTEM_ID,
-			     &bi->type);
+	bi->vendor = bus->host_pci->subsystem_vendor;
+	bi->type = bus->host_pci->subsystem_device;
 	bi->rev = bus->host_pci->revision;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/3 v2] ssb: use pci_dev->subsystem_{vendor,device}
  2011-07-01 18:34 [PATCH 3/3 v2] ssb: use pci_dev->subsystem_{vendor,device} Sergei Shtylyov
@ 2011-07-05 19:34 ` John W. Linville
  0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2011-07-05 19:34 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: mb, netdev

On Fri, Jul 01, 2011 at 10:34:42PM +0400, Sergei Shtylyov wrote:
> The SSB code reads PCI subsystem IDs from the PCI configuration registers while
> they are already stored by the PCI subsystem in the 'subsystem_{vendor|device}'
> fields of 'struct pci_dev'...
> 
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

Applied.

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-05 19:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-01 18:34 [PATCH 3/3 v2] ssb: use pci_dev->subsystem_{vendor,device} Sergei Shtylyov
2011-07-05 19:34 ` John W. Linville

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