clk: palmas: constify clk_ops structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 27 Oct 2018 05:47:37 +0000 (07:47 +0200)
committerStephen Boyd <sboyd@kernel.org>
Tue, 6 Nov 2018 17:41:44 +0000 (09:41 -0800)
The clk_ops structure is only stored in the ops field of clk_init_data
structures.  This field is 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/clk-palmas.c

index e9612e7068e9e80175e81645d8641b898c68d358..e41a3a9f7528ffcbfc40b469101a2db8c673edfd 100644 (file)
@@ -115,7 +115,7 @@ static int palmas_clks_is_prepared(struct clk_hw *hw)
        return !!(val & cinfo->clk_desc->enable_mask);
 }
 
-static struct clk_ops palmas_clks_ops = {
+static const struct clk_ops palmas_clks_ops = {
        .prepare        = palmas_clks_prepare,
        .unprepare      = palmas_clks_unprepare,
        .is_prepared    = palmas_clks_is_prepared,