Skip to contentSkip to conversation

ssb: use pci_dev->subsystem_{vendor,device}

PATCH Applied Sergei Shtylyov 2 participants 2 messages Jul 1, 2011 – Jul 5, 2011

Subsystems (3)

v2 of 5 Applied Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 3/3 ssb: use pci_dev->subsystem_{vendor,device}

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

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

 drivers/ssb/pci.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/ssb/pci.c +2 -4
Index: 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;
 }
 
#1 lore raw
Quoted 5 lines · Sergei Shtylyov

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

Applied.

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.