diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2015-06-19 17:20:58 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-07-14 14:40:39 -0400 |
commit | 2b4aed1d1f119634d80d8c701873c2be01480aa9 (patch) | |
tree | 500f561873b11219eb7c7e2ad89d2f0a94532242 /drivers/pci/probe.c | |
parent | eefaf338820ecd3fb14da496f8a740612257a341 (diff) |
PCI: Shift PCI_CLASS_NOT_DEFINED consistently with other classes
The PCI class in dev->class is a three-byte value comprising a base class,
sub-class, and interface type. PCI_CLASS_NOT_DEFINED includes the base
class and sub-class, but not the interface type, so it should be shifted to
make space for the interface. It happens that PCI_CLASS_NOT_DEFINED is
zero, so it doesn't matter in the end, but we should still use it
consistently with other class definitions.
Treat PCI_CLASS_NOT_DEFINED as a base class/sub-class value that should
appear in bits 8-23 of dev->class.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index cefd636681b6..71bd520e8ff7 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -1268,7 +1268,7 @@ int pci_setup_device(struct pci_dev *dev) | |||
1268 | bad: | 1268 | bad: |
1269 | dev_err(&dev->dev, "ignoring class %#08x (doesn't match header type %02x)\n", | 1269 | dev_err(&dev->dev, "ignoring class %#08x (doesn't match header type %02x)\n", |
1270 | dev->class, dev->hdr_type); | 1270 | dev->class, dev->hdr_type); |
1271 | dev->class = PCI_CLASS_NOT_DEFINED; | 1271 | dev->class = PCI_CLASS_NOT_DEFINED << 8; |
1272 | } | 1272 | } |
1273 | 1273 | ||
1274 | /* We found a fine healthy device, go go go... */ | 1274 | /* We found a fine healthy device, go go go... */ |