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 | |
parent | PM / core: fix typo in documentation (diff) | |
parent | PM / clk: don't leave clocks enabled when driver not bound (diff) | |
download | linux-c4e4d631feb3be4ddf885e647127fddebb450334.tar.xz linux-c4e4d631feb3be4ddf885e647127fddebb450334.zip |
Merge branch 'acpi-soc' into pm-core
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/dd.c | 10 | ||||
-rw-r--r-- | drivers/base/power/clock_ops.c | 1 |
2 files changed, 9 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); - } } diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index 60ee5591ee8f..c39b8617280f 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c @@ -473,6 +473,7 @@ static int pm_clk_notify(struct notifier_block *nb, enable_clock(dev, NULL); } break; + case BUS_NOTIFY_DRIVER_NOT_BOUND: case BUS_NOTIFY_UNBOUND_DRIVER: if (clknb->con_ids[0]) { for (con_id = clknb->con_ids; *con_id; con_id++) |