diff options
author | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2015-05-05 23:24:14 +0200 |
---|---|---|
committer | Klaus Goger <klaus.goger@theobroma-systems.com> | 2015-07-30 18:52:58 +0200 |
commit | 49a2157199999c397262757a302fea80b42dd3fb (patch) | |
tree | cb0b1baaabb52e1ff7b532a35262833369f17d35 | |
parent | db74f63aa29c867c76e5578674355d3ef6b82a96 (diff) |
Clk: Fixed: Registering fixed clocks as clkdev.
This patch registers the fixed-factor and fixed-rate clocks
as clkdev (after registering the clock itself).
This makes it possible to access them later via clk_get().
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
-rw-r--r-- | drivers/clk/clk-fixed-factor.c | 3 | ||||
-rw-r--r-- | drivers/clk/clk-fixed-rate.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index d9e3f671c2ea..4f70c230633c 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -9,6 +9,7 @@ */ #include <linux/module.h> #include <linux/clk-provider.h> +#include <linux/clkdev.h> #include <linux/slab.h> #include <linux/err.h> #include <linux/of.h> @@ -95,6 +96,8 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name, if (IS_ERR(clk)) kfree(fix); + clk_register_clkdev(clk, name, NULL); + return clk; } EXPORT_SYMBOL_GPL(clk_register_fixed_factor); diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c index 0fc56ab6e844..157bf04a0457 100644 --- a/drivers/clk/clk-fixed-rate.c +++ b/drivers/clk/clk-fixed-rate.c @@ -10,6 +10,7 @@ */ #include <linux/clk-provider.h> +#include <linux/clkdev.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/io.h> @@ -87,6 +88,8 @@ struct clk *clk_register_fixed_rate_with_accuracy(struct device *dev, if (IS_ERR(clk)) kfree(fixed); + clk_register_clkdev(clk, name, NULL); + return clk; } EXPORT_SYMBOL_GPL(clk_register_fixed_rate_with_accuracy); |