Commit 4d1518f5668ef1b3dff6c3b30fa761fe5573cdaa
1 parent
6d0e0e84f6
Exists in
master
and in
7 other branches
PM / Runtime: Handle clocks correctly if CONFIG_PM_RUNTIME is unset
Commit 85eb8c8d0b0900c073b0e6f89979ac9c439ade1a (PM / Runtime: Generic clock manipulation rountines for runtime PM (v6)) converted the shmobile platform to using generic code for runtime PM clock management, but it changed the behavior for CONFIG_PM_RUNTIME unset incorrectly. Specifically, for CONFIG_PM_RUNTIME unset pm_runtime_clk_notify() should enable clocks for action equal to BUS_NOTIFY_BIND_DRIVER and it should disable them for action equal to BUS_NOTIFY_UNBOUND_DRIVER (instead of BUS_NOTIFY_ADD_DEVICE and BUS_NOTIFY_DEL_DEVICE, respectively). Make this function behave as appropriate. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Magnus Damm <damm@opensource.se>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/base/power/clock_ops.c
... | ... | @@ -387,7 +387,7 @@ |
387 | 387 | clknb = container_of(nb, struct pm_clk_notifier_block, nb); |
388 | 388 | |
389 | 389 | switch (action) { |
390 | - case BUS_NOTIFY_ADD_DEVICE: | |
390 | + case BUS_NOTIFY_BIND_DRIVER: | |
391 | 391 | if (clknb->con_ids[0]) { |
392 | 392 | for (con_id = clknb->con_ids; *con_id; con_id++) |
393 | 393 | enable_clock(dev, *con_id); |
... | ... | @@ -395,7 +395,7 @@ |
395 | 395 | enable_clock(dev, NULL); |
396 | 396 | } |
397 | 397 | break; |
398 | - case BUS_NOTIFY_DEL_DEVICE: | |
398 | + case BUS_NOTIFY_UNBOUND_DRIVER: | |
399 | 399 | if (clknb->con_ids[0]) { |
400 | 400 | for (con_id = clknb->con_ids; *con_id; con_id++) |
401 | 401 | disable_clock(dev, *con_id); |