summaryrefslogtreecommitdiffstats
path: root/include/linux/clk-private.h
diff options
context:
space:
mode:
authorMike Turquette <mturquette@linaro.org>2012-03-29 14:30:40 -0700
committerMike Turquette <mturquette@linaro.org>2012-04-24 16:37:39 -0700
commitd1302a36a7f1c33d1a8babc6a510e1401a5e5aed (patch)
treebcb0d5f659a762764b75720fdada09ac9c548886 /include/linux/clk-private.h
parentd305fb78f31209596c9135d396a0d3af7ac86947 (diff)
downloadtalos-op-linux-d1302a36a7f1c33d1a8babc6a510e1401a5e5aed.tar.gz
talos-op-linux-d1302a36a7f1c33d1a8babc6a510e1401a5e5aed.zip
clk: core: copy parent_names & return error codes
This patch cleans up clk_register and solves a few bugs by teaching clk_register and __clk_init to return error codes (instead of just NULL) to better align with the existing clk.h api. Along with that change this patch also introduces a new behavior whereby clk_register copies the parent_names array, thus allowing platforms to declare their parent_names arrays as __initdata. Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'include/linux/clk-private.h')
-rw-r--r--include/linux/clk-private.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
index e9c8b9841b16..e7032fdd45eb 100644
--- a/include/linux/clk-private.h
+++ b/include/linux/clk-private.h
@@ -181,8 +181,10 @@ struct clk {
*
* It is not necessary to call clk_register if __clk_init is used directly with
* statically initialized clock data.
+ *
+ * Returns 0 on success, otherwise an error code.
*/
-void __clk_init(struct device *dev, struct clk *clk);
+int __clk_init(struct device *dev, struct clk *clk);
#endif /* CONFIG_COMMON_CLK */
#endif /* CLK_PRIVATE_H */
OpenPOWER on IntegriCloud