clk: pxa: constify clk_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 27 Oct 2018 05:47:39 +0000 (07:47 +0200)
committerStephen Boyd <sboyd@kernel.org>
Tue, 6 Nov 2018 17:41:57 +0000 (09:41 -0800)
These clk_ops structures are only passed to a call to
clk_register_composite where the corresponding parameters
are const, so the clk_ops structure can be const as well.

Identified and transformed using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/pxa/clk-pxa.c

index b80dc9d5855c9a041957cb7f067d072d868466b8..42627bf8a09ee141aa73498c9850ceea55b419a5 100644 (file)
@@ -70,7 +70,7 @@ static unsigned long cken_recalc_rate(struct clk_hw *hw,
        return clk_fixed_factor_ops.recalc_rate(&fix->hw, parent_rate);
 }
 
-static struct clk_ops cken_rate_ops = {
+static const struct clk_ops cken_rate_ops = {
        .recalc_rate = cken_recalc_rate,
 };
 
@@ -83,7 +83,7 @@ static u8 cken_get_parent(struct clk_hw *hw)
        return pclk->is_in_low_power() ? 0 : 1;
 }
 
-static struct clk_ops cken_mux_ops = {
+static const struct clk_ops cken_mux_ops = {
        .get_parent = cken_get_parent,
        .set_parent = dummy_clk_set_parent,
 };