summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-10-22 12:11:39 +0300
committerBjorn Helgaas <bhelgaas@google.com>2024-10-22 10:06:55 -0500
commitde2cdf110a39a660e810979e480761fed9842436 (patch)
tree1b4dc27f2011ecb0f341a082c0072c5546dc89b6
parent752430d1d33ed69653a6e8dbdf01f83cdf5be574 (diff)
PCI: cpqphp: Use define to read class/revision dword
Replace literal 0x08 with PCI_CLASS_REVISION. Link: https://lore.kernel.org/r/20241022091140.3504-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/pci/hotplug/cpqphp_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c
index 7844007dbc86..558866c15e03 100644
--- a/drivers/pci/hotplug/cpqphp_pci.c
+++ b/drivers/pci/hotplug/cpqphp_pci.c
@@ -199,7 +199,7 @@ static int PCI_ScanBusForNonBridge(struct controller *ctrl, u8 bus_num, u8 *dev_
/* Scan for access first */
if (!pci_bus_read_dev_vendor_id(ctrl->pci_bus, tdevice, &work, 0))
continue;
- ret = pci_bus_read_config_dword(ctrl->pci_bus, tdevice, 0x08, &work);
+ ret = pci_bus_read_config_dword(ctrl->pci_bus, tdevice, PCI_CLASS_REVISION, &work);
if (ret)
continue;
dbg("Looking for nonbridge bus_num %d dev_num %d\n", bus_num, tdevice);
@@ -214,7 +214,7 @@ static int PCI_ScanBusForNonBridge(struct controller *ctrl, u8 bus_num, u8 *dev_
/* Scan for access first */
if (!pci_bus_read_dev_vendor_id(ctrl->pci_bus, tdevice, &work, 0))
continue;
- ret = pci_bus_read_config_dword(ctrl->pci_bus, tdevice, 0x08, &work);
+ ret = pci_bus_read_config_dword(ctrl->pci_bus, tdevice, PCI_CLASS_REVISION, &work);
if (ret)
continue;
dbg("Looking for bridge bus_num %d dev_num %d\n", bus_num, tdevice);