diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-08 01:11:49 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-08 01:11:49 +0100 |
commit | c4e4d631feb3be4ddf885e647127fddebb450334 (patch) | |
tree | 72b38ba229ab010d131f583ef67cb792a23f0280 /drivers/base/dd.c | |
parent | 4295733eee4e69eda432d95765b7762dc6013271 (diff) | |
parent | d35818a9153e7f230fd65dc935e001a1b9bc08ff (diff) |
Merge branch 'acpi-soc' into pm-core
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r-- | drivers/base/dd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 8d4eb4dbd52d..7399be790b5d 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -299,6 +299,9 @@ int device_bind_driver(struct device *dev) ret = driver_sysfs_add(dev); if (!ret) driver_bound(dev); + else if (dev->bus) + blocking_notifier_call_chain(&dev->bus->p->bus_notifier, + BUS_NOTIFY_DRIVER_NOT_BOUND, dev); return ret; } EXPORT_SYMBOL_GPL(device_bind_driver); @@ -332,7 +335,7 @@ static int really_probe(struct device *dev, struct device_driver *drv) /* If using pinctrl, bind pins now before probing */ ret = pinctrl_bind_pins(dev); if (ret) - goto probe_failed; + goto pinctrl_bind_failed; if (driver_sysfs_add(dev)) { printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n", @@ -376,6 +379,10 @@ static int really_probe(struct device *dev, struct device_driver *drv) goto done; probe_failed: + if (dev->bus) + blocking_notifier_call_chain(&dev->bus->p->bus_notifier, + BUS_NOTIFY_DRIVER_NOT_BOUND, dev); +pinctrl_bind_failed: devres_release_all(dev); driver_sysfs_remove(dev); dev->driver = NULL; @@ -749,7 +756,6 @@ static void __device_release_driver(struct device *dev) blocking_notifier_call_chain(&dev->bus->p->bus_notifier, BUS_NOTIFY_UNBOUND_DRIVER, dev); - } } |