]> git.baikalelectronics.ru Git - kernel.git/commit
clk: Simplify __of_clk_get_hw_from_provider()
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 25 Aug 2016 20:35:36 +0000 (13:35 -0700)
committerStephen Boyd <sboyd@codeaurora.org>
Fri, 26 Aug 2016 19:28:27 +0000 (12:28 -0700)
commite4e0d00e801ff9bdc4905e50a9ad04b03623b0a8
tree81e96a52108498fe32d5653933b92295bfd31c3a
parent029b2adfd850e0be0b162f2edb6a204a2f085810
clk: Simplify __of_clk_get_hw_from_provider()

__of_clk_get_hw_from_provider() is confusing because it will
return EPROBE_DEFER if there isn't a ->get() or ->get_hw()
function pointer in a provider. That's just a bug though, and we
used to NULL pointer exception when ->get() was missing anyway,
so let's make this more obvious that they're not optional. The
assumption is that most providers will implement ->get_hw() so we
only fallback to the ->get() function if necessary. This
clarifies the intent and removes any possibility of probe defer
happening if clk providers are buggy.

Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk.c