]> git.baikalelectronics.ru Git - kernel.git/commit
clk: Don't return negative numbers for unsigned values with !clk
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 4 Oct 2012 06:38:55 +0000 (23:38 -0700)
committerMike Turquette <mturquette@linaro.org>
Mon, 29 Oct 2012 18:05:03 +0000 (11:05 -0700)
commit92491f872387e2105d3e7bb56a499f06331405c0
treed9fbe4f63392d462b41296b9407ec622d9212823
parent238f83f82d8ff1499674387c121971f4ff135518
clk: Don't return negative numbers for unsigned values with !clk

Some of the helper functions return negative error codes if
passed a NULL clock. This can lead to confusing behavior when the
expected return value is unsigned. Fix up these accessors so that
they return unsigned values (or bool in the case of is_enabled).
This way we can't interpret NULL clocks as having valid and
interesting values.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk.c
include/linux/clk-provider.h