diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2007-06-08 15:46:30 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 16:02:09 -0700 |
commit | b8a3a5214d7cc115f1ca3a3967b7229d97c46f4a (patch) | |
tree | 221d50091530cb442496e09591b3bf7ac06e57b4 /drivers | |
parent | 56906c612e10b5e32a48ccbe8a3c08ab6acf5a28 (diff) | |
download | linux-3.10-b8a3a5214d7cc115f1ca3a3967b7229d97c46f4a.tar.gz linux-3.10-b8a3a5214d7cc115f1ca3a3967b7229d97c46f4a.tar.bz2 linux-3.10-b8a3a5214d7cc115f1ca3a3967b7229d97c46f4a.zip |
PCI: read revision ID by default
Currently there are 97 occurrences where drivers need the pci
revision ID. We can do this once for all devices. Even the pci
subsystem needs the revision several times for quirks. The extra
u8 member pads out nicely in the pci_dev struct.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/probe.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 9cd983acba8..8802fcb4aaf 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -702,6 +702,7 @@ static int pci_setup_device(struct pci_dev * dev) dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); + dev->revision = class & 0xff; class >>= 8; /* upper 3 bytes */ dev->class = class; class >>= 8; |