clk: s2mps11: constify clk_ops structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 27 Oct 2018 05:47:40 +0000 (07:47 +0200)
committerStephen Boyd <sboyd@kernel.org>
Tue, 6 Nov 2018 17:42:12 +0000 (09:42 -0800)
The clk_ops structure is only stored in the ops fields 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>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-s2mps11.c

index 5b419b82f7ca1c57d8e687c459f33753b7014f7a..2ce370c804aae736a7a596997972d916326ab740 100644 (file)
@@ -71,7 +71,7 @@ static unsigned long s2mps11_clk_recalc_rate(struct clk_hw *hw,
        return 32768;
 }
 
-static struct clk_ops s2mps11_clk_ops = {
+static const struct clk_ops s2mps11_clk_ops = {
        .prepare        = s2mps11_clk_prepare,
        .unprepare      = s2mps11_clk_unprepare,
        .is_prepared    = s2mps11_clk_is_prepared,