summaryrefslogtreecommitdiffstats
path: root/drivers/pci/bus.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-14 22:22:31 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-14 22:22:31 +0200
commitbbb9e06d2c6435af9c62074ad7048910eeb2e7bc (patch)
tree17d152543a602d65c749efaaaaafde24d5fec46c /drivers/pci/bus.c
parentUSB: gadget: f_mass_storage: Fix unused variable warning (diff)
parentLinux 6.5-rc6 (diff)
downloadlinux-bbb9e06d2c6435af9c62074ad7048910eeb2e7bc.tar.xz
linux-bbb9e06d2c6435af9c62074ad7048910eeb2e7bc.zip
Merge 6.5-rc6 into usb-next
We need the USB and Thunderbolt fixes in here to build on. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r--drivers/pci/bus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 5bc81cc0a2de..46b252bbe500 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -11,6 +11,7 @@
#include <linux/pci.h>
#include <linux/errno.h>
#include <linux/ioport.h>
+#include <linux/of.h>
#include <linux/proc_fs.h>
#include <linux/slab.h>
@@ -332,6 +333,7 @@ void __weak pcibios_bus_add_device(struct pci_dev *pdev) { }
*/
void pci_bus_add_device(struct pci_dev *dev)
{
+ struct device_node *dn = dev->dev.of_node;
int retval;
/*
@@ -344,7 +346,7 @@ void pci_bus_add_device(struct pci_dev *dev)
pci_proc_attach_device(dev);
pci_bridge_d3_update(dev);
- dev->match_driver = true;
+ dev->match_driver = !dn || of_device_is_available(dn);
retval = device_attach(&dev->dev);
if (retval < 0 && retval != -EPROBE_DEFER)
pci_warn(dev, "device attach failed (%d)\n", retval);