clk: Fixup errorhandling for clk_set_parent
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 2 Apr 2013 21:09:38 +0000 (23:09 +0200)
committerMike Turquette <mturquette@linaro.org>
Tue, 9 Apr 2013 01:19:32 +0000 (18:19 -0700)
commit031dcc9bd4164a7482b89987d5b9ecb3af5e9033
treeacab66af5c502cd7ad651de07356e33d3ad36b3b
parentb33d212f4910ca44bd37d5e08422230687bd1378
clk: Fixup errorhandling for clk_set_parent

Fixup the broken feature of allowing reparent of a clk to the
orhpan list and vice verse. When operating on a single-parent
clk, the .set_parent callback for the clk hw is optional to
implement, but for a multi-parent clk it is mandatory.

Moreover improve the errorhandling by verifying the prerequisites
before triggering clk notifiers. This will prevent unnecessary
rollback with ABORT_RATE_CHANGE.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk.c