[PATCH V3 2/8] clk: add a fixed factor clock
Viresh Kumar
viresh.kumar at st.com
Thu May 3 05:48:25 EDT 2012
On 5/3/2012 12:07 PM, Sascha Hauer wrote:
> Yes, looks good.
Thanks. Here is one more to review, found after rebasing on latest
clk-next from Mike. I will send this a complete patch for fixed factor
clock separately, following is just for review.
This happened due to Saravana's patch:
---
drivers/clk/clk-fixed-factor.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index 8d25c2e..0e8782b 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -66,10 +66,10 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
unsigned int mult, unsigned int div)
{
struct clk_fixed_factor *fix;
+ struct clk_init_data init;
struct clk *clk;
fix = kmalloc(sizeof(*fix), GFP_KERNEL);
-
if (!fix) {
pr_err("%s: could not allocate fixed factor clk\n", __func__);
return ERR_PTR(-ENOMEM);
@@ -78,12 +78,15 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
/* struct clk_fixed_factor assignments */
fix->mult = mult;
fix->div = div;
+ fix->hw.init = &init;
+
+ init.name = name;
+ init.ops = &clk_fixed_factor_ops;
+ init.flags = flags;
+ init.parent_names = &parent_name;
+ init.num_parents = 1;
- clk = clk_register(dev, name,
- &clk_fixed_factor_ops, &fix->hw,
- &parent_name,
- (parent_name ? 1 : 0),
- flags);
+ clk = clk_register(dev, &fix->hw);
if (clk)
return clk;
--
viresh
More information about the linux-arm-kernel
mailing list