Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / drivers / clk / clk-fixed-factor.c
index d9e3f671c2ea634012982c2228493cba8eb71903..fccabe497f6e5db42f6585acd9ecb1c4440bcb4e 100644 (file)
@@ -55,10 +55,16 @@ static long clk_factor_round_rate(struct clk_hw *hw, unsigned long rate,
 static int clk_factor_set_rate(struct clk_hw *hw, unsigned long rate,
                                unsigned long parent_rate)
 {
+       /*
+        * We must report success but we can do so unconditionally because
+        * clk_factor_round_rate returns values that ensure this call is a
+        * nop.
+        */
+
        return 0;
 }
 
-struct clk_ops clk_fixed_factor_ops = {
+const struct clk_ops clk_fixed_factor_ops = {
        .round_rate = clk_factor_round_rate,
        .set_rate = clk_factor_set_rate,
        .recalc_rate = clk_factor_recalc_rate,
@@ -74,10 +80,8 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
        struct clk *clk;
 
        fix = kmalloc(sizeof(*fix), GFP_KERNEL);
-       if (!fix) {
-               pr_err("%s: could not allocate fixed factor clk\n", __func__);
+       if (!fix)
                return ERR_PTR(-ENOMEM);
-       }
 
        /* struct clk_fixed_factor assignments */
        fix->mult = mult;
This page took 0.065372 seconds and 5 git commands to generate.