X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fbase%2Fdd.c;h=7399be790b5dbdf8715694522ba410cdede2808f;hb=92266e1de4324a23359fe71678cb521987fea0c5;hp=8d4eb4dbd52d3cd28d8b548efa914b75b67cfa1a;hpb=4295733eee4e69eda432d95765b7762dc6013271;p=linux-beck.git 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); - } }