diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-07-13 11:21:25 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-07-22 11:25:42 -0400 |
commit | 69b3e6199a2d01ad2e3102052be08e0ced91f388 (patch) | |
tree | 4310e1d65f7b92a92bd27cb1d92ca0041bc5e2c6 /drivers/pci | |
parent | db34a363b992e0c8063f432607561520d79fbfb8 (diff) |
PCI hotplug: cpqphp: use pci_dev->subsystem_{vendor|device}
The driver reads PCI subsystem IDs from the PCI configuration registers while
they are already stored by the PCI subsystem in the 'subsystem_{vendor|device}'
fields 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')
-rw-r--r-- | drivers/pci/hotplug/cpqphp_core.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index 4952c3b9379d..627274cc571f 100644 --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/drivers/pci/hotplug/cpqphp_core.c | |||
@@ -868,11 +868,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
868 | /* TODO: This code can be made to support non-Compaq or Intel | 868 | /* TODO: This code can be made to support non-Compaq or Intel |
869 | * subsystem IDs | 869 | * subsystem IDs |
870 | */ | 870 | */ |
871 | rc = pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vid); | 871 | subsystem_vid = pdev->subsystem_vendor; |
872 | if (rc) { | ||
873 | err("%s : pci_read_config_word failed\n", __func__); | ||
874 | goto err_disable_device; | ||
875 | } | ||
876 | dbg("Subsystem Vendor ID: %x\n", subsystem_vid); | 872 | dbg("Subsystem Vendor ID: %x\n", subsystem_vid); |
877 | if ((subsystem_vid != PCI_VENDOR_ID_COMPAQ) && (subsystem_vid != PCI_VENDOR_ID_INTEL)) { | 873 | if ((subsystem_vid != PCI_VENDOR_ID_COMPAQ) && (subsystem_vid != PCI_VENDOR_ID_INTEL)) { |
878 | err(msg_HPC_non_compaq_or_intel); | 874 | err(msg_HPC_non_compaq_or_intel); |
@@ -887,11 +883,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
887 | goto err_disable_device; | 883 | goto err_disable_device; |
888 | } | 884 | } |
889 | 885 | ||
890 | rc = pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &subsystem_deviceid); | 886 | subsystem_deviceid = pdev->subsystem_device; |
891 | if (rc) { | ||
892 | err("%s : pci_read_config_word failed\n", __func__); | ||
893 | goto err_free_ctrl; | ||
894 | } | ||
895 | 887 | ||
896 | info("Hot Plug Subsystem Device ID: %x\n", subsystem_deviceid); | 888 | info("Hot Plug Subsystem Device ID: %x\n", subsystem_deviceid); |
897 | 889 | ||