ssb: use pci_dev->revision
Subsystems (3)
PATCH v2 2/3 ssb: use pci_dev->revision
The SSB code reads PCI revision ID from the PCI configuration register while it's already stored by the PCI subsystem in the 'revision' field of 'struct pci_dev'...
Signed-off-by Sergei Shtylyov <[email protected]>
---
The patch is against the recent Linus' tree.
drivers/ssb/pci.c | 3 +-- drivers/ssb/scan.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/ssb/pci.c +1 -2
@@ -738,8 +738,7 @@ static void ssb_pci_get_boardinfo(struct &bi->vendor);pci_read_config_word (bus->host_pci,PCI_SUBSYSTEM_ID , &bi->type); -pci_read_config_byte (bus->host_pci,PCI_REVISION_ID , - &bi->rev); + bi->rev = bus->host_pci->revision; } int ssb_pci_get_invariants(struct ssb_bus *bus,
drivers/ssb/scan.c +1 -2
@@ -310,8 +310,7 @@ int ssb_bus_scan(struct ssb_bus *bus, }else {if (bus->bustype ==SSB_BUSTYPE_PCI ) { bus->chip_id =pcidev_to_chipid (bus->host_pci); -pci_read_config_byte (bus->host_pci,PCI_REVISION_ID , - &bus->chip_rev); + bus->chip_rev = bus->host_pci->revision; bus->chip_package =0 ; }else { bus->chip_id =0x4710 ;
John W. Linville
AppliedQuoted 5 lines · Sergei Shtylyov
The SSB code reads PCI revision ID from the PCI configuration register while it's already stored by the PCI subsystem in the 'revision' field of 'struct
pci_dev'...Signed-off-by Sergei Shtylyov <[email protected]>
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.