diff options
-rw-r--r-- | drivers/pci/probe.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 9f2ff8c5dc2f..aa9b1dec0d3e 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -926,12 +926,10 @@ int pci_setup_device(struct pci_dev *dev) | |||
926 | 926 | ||
927 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); | 927 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); |
928 | dev->revision = class & 0xff; | 928 | dev->revision = class & 0xff; |
929 | class >>= 8; /* upper 3 bytes */ | 929 | dev->class = class >> 8; /* upper 3 bytes */ |
930 | dev->class = class; | ||
931 | class >>= 8; | ||
932 | 930 | ||
933 | dev_printk(KERN_DEBUG, &dev->dev, "[%04x:%04x] type %d class %#08x\n", | 931 | dev_printk(KERN_DEBUG, &dev->dev, "[%04x:%04x] type %02x class %#08x\n", |
934 | dev->vendor, dev->device, dev->hdr_type, class); | 932 | dev->vendor, dev->device, dev->hdr_type, dev->class); |
935 | 933 | ||
936 | /* need to have dev->class ready */ | 934 | /* need to have dev->class ready */ |
937 | dev->cfg_size = pci_cfg_space_size(dev); | 935 | dev->cfg_size = pci_cfg_space_size(dev); |
@@ -1013,8 +1011,8 @@ int pci_setup_device(struct pci_dev *dev) | |||
1013 | return -EIO; | 1011 | return -EIO; |
1014 | 1012 | ||
1015 | bad: | 1013 | bad: |
1016 | dev_err(&dev->dev, "ignoring class %02x (doesn't match header " | 1014 | dev_err(&dev->dev, "ignoring class %#08x (doesn't match header " |
1017 | "type %02x)\n", class, dev->hdr_type); | 1015 | "type %02x)\n", dev->class, dev->hdr_type); |
1018 | dev->class = PCI_CLASS_NOT_DEFINED; | 1016 | dev->class = PCI_CLASS_NOT_DEFINED; |
1019 | } | 1017 | } |
1020 | 1018 | ||