summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/probe.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 150093817c59..5e001bbc2392 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1853,6 +1853,11 @@ struct pci_dev *pci_alloc_dev(struct pci_bus *bus)
}
EXPORT_SYMBOL(pci_alloc_dev);
+static bool pci_bus_crs_vendor_id(u32 l)
+{
+ return (l & 0xffff) == 0x0001;
+}
+
bool pci_bus_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l,
int crs_timeout)
{
@@ -1872,7 +1877,7 @@ bool pci_bus_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l,
* by the PCIe spec. Ignore the device ID and only check for
* (vendor id == 1).
*/
- while ((*l & 0xffff) == 0x0001) {
+ while (pci_bus_crs_vendor_id(*l)) {
if (!crs_timeout)
return false;