summaryrefslogtreecommitdiffstats
path: root/drivers/base/power/clock_ops.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2016-01-07 12:49:31 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-08 01:08:27 +0100
commitd35818a9153e7f230fd65dc935e001a1b9bc08ff (patch)
tree96b701744a1e1f0c196b35b9188a77a6ba3c4d59 /drivers/base/power/clock_ops.c
parent04a407f6b129b6e35de3250c313976a3a154476e (diff)
downloadlinux-d35818a9153e7f230fd65dc935e001a1b9bc08ff.tar.bz2
PM / clk: don't leave clocks enabled when driver not bound
There is a new notification BUS_NOTIFY_DRIVER_NOT_BOUND that is issued when driver fails during binding. In such case pm_clk_notify(), when PM_CLK=n, leaves clocks enabled. Undo operations that have been done in BUS_NOTIFY_BIND_DRIVER case. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power/clock_ops.c')
-rw-r--r--drivers/base/power/clock_ops.c1
1 files changed, 1 insertions, 0 deletions
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++)