PM / clk: don't leave clocks enabled when driver not bound
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 7 Jan 2016 10:49:31 +0000 (12:49 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 8 Jan 2016 00:08:27 +0000 (01:08 +0100)
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>
drivers/base/power/clock_ops.c

index 60ee559..c39b861 100644 (file)
@@ -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++)