clk: imx: constify clk_div_table
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 28 Aug 2017 05:28:52 +0000 (10:58 +0530)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 31 Aug 2017 05:30:27 +0000 (22:30 -0700)
clk_div_table are not supposed to change at runtime. All functions
working with clk_div_table provided by <linux/clk-provider.h> work
with const clk_div_table. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/imx/clk-imx6sl.c
drivers/clk/imx/clk-imx6sx.c
drivers/clk/imx/clk-imx6ul.c
drivers/clk/imx/clk-imx7d.c
drivers/clk/imx/clk-vf610.c

index 5fd4ddac1bf19cba71f16d95911e1a2e54218f0f..9642cdf0fb88e0e717e4cb7fdf9986f88fa02fd8 100644 (file)
@@ -71,7 +71,7 @@ static const char *pll5_bypass_sels[] = { "pll5", "pll5_bypass_src", };
 static const char *pll6_bypass_sels[]  = { "pll6", "pll6_bypass_src", };
 static const char *pll7_bypass_sels[]  = { "pll7", "pll7_bypass_src", };
 
-static struct clk_div_table clk_enet_ref_table[] = {
+static const struct clk_div_table clk_enet_ref_table[] = {
        { .val = 0, .div = 20, },
        { .val = 1, .div = 10, },
        { .val = 2, .div = 5, },
@@ -79,14 +79,14 @@ static struct clk_div_table clk_enet_ref_table[] = {
        { }
 };
 
-static struct clk_div_table post_div_table[] = {
+static const struct clk_div_table post_div_table[] = {
        { .val = 2, .div = 1, },
        { .val = 1, .div = 2, },
        { .val = 0, .div = 4, },
        { }
 };
 
-static struct clk_div_table video_div_table[] = {
+static const struct clk_div_table video_div_table[] = {
        { .val = 0, .div = 1, },
        { .val = 1, .div = 2, },
        { .val = 2, .div = 1, },
index b5c96de41ccf957b5f556794756545714d0a3528..e6d389e333d7d15bdb30cde8d2db45abc1706f3b 100644 (file)
@@ -105,7 +105,7 @@ static int const clks_init_on[] __initconst = {
        IMX6SX_CLK_EPIT2,
 };
 
-static struct clk_div_table clk_enet_ref_table[] = {
+static const struct clk_div_table clk_enet_ref_table[] = {
        { .val = 0, .div = 20, },
        { .val = 1, .div = 10, },
        { .val = 2, .div = 5, },
@@ -113,14 +113,14 @@ static struct clk_div_table clk_enet_ref_table[] = {
        { }
 };
 
-static struct clk_div_table post_div_table[] = {
+static const struct clk_div_table post_div_table[] = {
        { .val = 2, .div = 1, },
        { .val = 1, .div = 2, },
        { .val = 0, .div = 4, },
        { }
 };
 
-static struct clk_div_table video_div_table[] = {
+static const struct clk_div_table video_div_table[] = {
        { .val = 0, .div = 1, },
        { .val = 1, .div = 2, },
        { .val = 2, .div = 1, },
index b4e0dff3c8c26b9c2a7eac10702b222e486bad96..5e8c18afce9ad35742dd378cded8042abe80c922 100644 (file)
@@ -78,7 +78,7 @@ static int const clks_init_on[] __initconst = {
        IMX6UL_CLK_MMDC_P0_FAST, IMX6UL_CLK_MMDC_P0_IPG,
 };
 
-static struct clk_div_table clk_enet_ref_table[] = {
+static const struct clk_div_table clk_enet_ref_table[] = {
        { .val = 0, .div = 20, },
        { .val = 1, .div = 10, },
        { .val = 2, .div = 5, },
@@ -86,14 +86,14 @@ static struct clk_div_table clk_enet_ref_table[] = {
        { }
 };
 
-static struct clk_div_table post_div_table[] = {
+static const struct clk_div_table post_div_table[] = {
        { .val = 2, .div = 1, },
        { .val = 1, .div = 2, },
        { .val = 0, .div = 4, },
        { }
 };
 
-static struct clk_div_table video_div_table[] = {
+static const struct clk_div_table video_div_table[] = {
        { .val = 0, .div = 1, },
        { .val = 1, .div = 2, },
        { .val = 2, .div = 1, },
index 3da121826b1baba4667858e01579dfb7d1acab12..2305699db46798441c7c32ef8910b5fe3354c64a 100644 (file)
@@ -27,7 +27,7 @@ static u32 share_count_sai2;
 static u32 share_count_sai3;
 static u32 share_count_nand;
 
-static struct clk_div_table test_div_table[] = {
+static const struct clk_div_table test_div_table[] = {
        { .val = 3, .div = 1, },
        { .val = 2, .div = 1, },
        { .val = 1, .div = 2, },
@@ -35,7 +35,7 @@ static struct clk_div_table test_div_table[] = {
        { }
 };
 
-static struct clk_div_table post_div_table[] = {
+static const struct clk_div_table post_div_table[] = {
        { .val = 3, .div = 4, },
        { .val = 2, .div = 1, },
        { .val = 1, .div = 2, },
index 59b1863deb88863fcf9e1b113ea14303dfcb5f04..6dae54325a91ddb32bb733b9d7d5cf48d0ecc023 100644 (file)
@@ -102,7 +102,7 @@ static const char *ftm_ext_sels[]   = {"sirc_128k", "sxosc", "fxosc_half", "audio_
 static const char *ftm_fix_sels[]      = { "sxosc", "ipg_bus", };
 
 
-static struct clk_div_table pll4_audio_div_table[] = {
+static const struct clk_div_table pll4_audio_div_table[] = {
        { .val = 0, .div = 1 },
        { .val = 1, .div = 2 },
        { .val = 2, .div = 6 },