Commit 05d3ac26 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Jesse Barnes

PCI hotplug: cpqphp: use pci_dev->vendor

The driver reads PCI vendor ID from the PCI configuration register while it is
already stored by the PCI subsystem in the 'vendor' field of 'struct pci_dev'...
Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 69b3e619
...@@ -840,8 +840,9 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -840,8 +840,9 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* Need to read VID early b/c it's used to differentiate CPQ and INTC /* Need to read VID early b/c it's used to differentiate CPQ and INTC
* discovery * discovery
*/ */
rc = pci_read_config_word(pdev, PCI_VENDOR_ID, &vendor_id); vendor_id = pdev->vendor;
if (rc || ((vendor_id != PCI_VENDOR_ID_COMPAQ) && (vendor_id != PCI_VENDOR_ID_INTEL))) { if ((vendor_id != PCI_VENDOR_ID_COMPAQ) &&
(vendor_id != PCI_VENDOR_ID_INTEL)) {
err(msg_HPC_non_compaq_or_intel); err(msg_HPC_non_compaq_or_intel);
rc = -ENODEV; rc = -ENODEV;
goto err_disable_device; goto err_disable_device;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment