clk: Properly handle notifier return values
authorSoren Brinkmann <soren.brinkmann@xilinx.com>
Wed, 3 Apr 2013 19:17:12 +0000 (12:17 -0700)
committerMike Turquette <mturquette@linaro.org>
Wed, 10 Apr 2013 23:33:53 +0000 (16:33 -0700)
Notifiers may return NOTIFY_(OK|DONE|STOP|BAD). The CCF uses an
inconsistent mix of checking against NOTIFY_STOP or NOTIFY_BAD.
This inconsistency leaves errors undetected in some cases:
clk_set_parent() calls __clk_speculate_rates(), which stops when it
hits a NOTIFIER_BAD (STOP is ignored), and passes this value back to the
caller.
clk_set_parent() compares this return value against NOTIFY_STOP only,
ignoring NOTIFY_BAD returns.

Use NOTIFY_STOP_MASK to detect a negative notifier return value and
document all four return value options.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>

No differences found