aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2011-07-13 11:20:14 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-07-22 11:25:43 -0400
commit05d3ac267a9d10af6ca370afe21802333aad1d5c (patch)
treee899a687abe79fd272fbd3f8b6b2ca88057a21fa /drivers/pci/hotplug
parent69b3e6199a2d01ad2e3102052be08e0ced91f388 (diff)
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: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/cpqphp_core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 627274cc571..f1ce99cceac 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -840,8 +840,9 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
840 /* Need to read VID early b/c it's used to differentiate CPQ and INTC 840 /* Need to read VID early b/c it's used to differentiate CPQ and INTC
841 * discovery 841 * discovery
842 */ 842 */
843 rc = pci_read_config_word(pdev, PCI_VENDOR_ID, &vendor_id); 843 vendor_id = pdev->vendor;
844 if (rc || ((vendor_id != PCI_VENDOR_ID_COMPAQ) && (vendor_id != PCI_VENDOR_ID_INTEL))) { 844 if ((vendor_id != PCI_VENDOR_ID_COMPAQ) &&
845 (vendor_id != PCI_VENDOR_ID_INTEL)) {
845 err(msg_HPC_non_compaq_or_intel); 846 err(msg_HPC_non_compaq_or_intel);
846 rc = -ENODEV; 847 rc = -ENODEV;
847 goto err_disable_device; 848 goto err_disable_device;