diff options
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r-- | drivers/pci/bus.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 847f3ca47bb8..c8709c6fdb7c 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -177,10 +177,15 @@ int pci_bus_add_device(struct pci_dev *dev) if (retval) return retval; + dev->match_driver = false; retval = device_add(&dev->dev); if (retval) return retval; + dev->match_driver = true; + retval = device_attach(&dev->dev); + WARN_ON(retval < 0); + dev->is_added = 1; pci_proc_attach_device(dev); pci_create_sysfs_dev_files(dev); |