Skip to content

Commit

Permalink
PM / clk: don't leave clocks enabled when driver not bound
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Rafael J. Wysocki committed Jan 8, 2016
1 parent 04a407f commit d35818a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/base/power/clock_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit d35818a

Please sign in to comment.