Skip to content

Commit 94ce1ac

Browse files
committed
Merge tag 'pci-v6.16-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull pci fix from Bjorn Helgaas: - Create pwrctrl devices only when we need them, i.e., when CONFIG_PCI_PWRCTRL is enabled. This allows brcmstb to work around a pwrctrl regression by disabling CONFIG_PCI_PWRCTRL (Manivannan Sadhasivam) * tag 'pci-v6.16-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI/pwrctrl: Create pwrctrl devices only when CONFIG_PCI_PWRCTRL is enabled
2 parents dd9c173 + 8c493cc commit 94ce1ac

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/pci/probe.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2508,6 +2508,7 @@ bool pci_bus_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l,
25082508
}
25092509
EXPORT_SYMBOL(pci_bus_read_dev_vendor_id);
25102510

2511+
#if IS_ENABLED(CONFIG_PCI_PWRCTRL)
25112512
static struct platform_device *pci_pwrctrl_create_device(struct pci_bus *bus, int devfn)
25122513
{
25132514
struct pci_host_bridge *host = pci_find_host_bridge(bus);
@@ -2537,6 +2538,12 @@ static struct platform_device *pci_pwrctrl_create_device(struct pci_bus *bus, in
25372538

25382539
return pdev;
25392540
}
2541+
#else
2542+
static struct platform_device *pci_pwrctrl_create_device(struct pci_bus *bus, int devfn)
2543+
{
2544+
return NULL;
2545+
}
2546+
#endif
25402547

25412548
/*
25422549
* Read the config data for a PCI device, sanity-check it,

0 commit comments

Comments
 (0)