summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-fixed.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk-fixed.c')
-rw-r--r--drivers/clk/clk-fixed.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/clk/clk-fixed.c b/drivers/clk/clk-fixed.c
index b961c382ec..6ec2feb84f 100644
--- a/drivers/clk/clk-fixed.c
+++ b/drivers/clk/clk-fixed.c
@@ -45,6 +45,10 @@ struct clk *clk_register_fixed_rate(const char *name,
if (!parent_names)
return ERR_PTR(-ENOMEM);
+ parent_names[0] = strdup(parent_name);
+ if (!parent_names[0])
+ return ERR_PTR(-ENOMEM);
+
fix->hw.clk.parent_names = parent_names;
fix->hw.clk.num_parents = 1;
}
@@ -59,6 +63,14 @@ struct clk *clk_register_fixed_rate(const char *name,
return &fix->hw.clk;
}
+struct clk_hw *clk_hw_register_fixed_rate(struct device *dev,
+ const char *name, const char *parent_name,
+ unsigned long flags, unsigned long rate)
+{
+ return clk_to_clk_hw(clk_register_fixed_rate(xstrdup(name), parent_name,
+ flags, rate));
+}
+
/**
* of_fixed_clk_setup() - Setup function for simple fixed rate clock
*/