Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: imx: constify clk_div_table

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>

authored by

Arvind Yadav and committed by
Stephen Boyd
fdda6ee9 9959989f

+12 -12
+3 -3
drivers/clk/imx/clk-imx6sl.c
··· 71 71 static const char *pll6_bypass_sels[] = { "pll6", "pll6_bypass_src", }; 72 72 static const char *pll7_bypass_sels[] = { "pll7", "pll7_bypass_src", }; 73 73 74 - static struct clk_div_table clk_enet_ref_table[] = { 74 + static const struct clk_div_table clk_enet_ref_table[] = { 75 75 { .val = 0, .div = 20, }, 76 76 { .val = 1, .div = 10, }, 77 77 { .val = 2, .div = 5, }, ··· 79 79 { } 80 80 }; 81 81 82 - static struct clk_div_table post_div_table[] = { 82 + static const struct clk_div_table post_div_table[] = { 83 83 { .val = 2, .div = 1, }, 84 84 { .val = 1, .div = 2, }, 85 85 { .val = 0, .div = 4, }, 86 86 { } 87 87 }; 88 88 89 - static struct clk_div_table video_div_table[] = { 89 + static const struct clk_div_table video_div_table[] = { 90 90 { .val = 0, .div = 1, }, 91 91 { .val = 1, .div = 2, }, 92 92 { .val = 2, .div = 1, },
+3 -3
drivers/clk/imx/clk-imx6sx.c
··· 105 105 IMX6SX_CLK_EPIT2, 106 106 }; 107 107 108 - static struct clk_div_table clk_enet_ref_table[] = { 108 + static const struct clk_div_table clk_enet_ref_table[] = { 109 109 { .val = 0, .div = 20, }, 110 110 { .val = 1, .div = 10, }, 111 111 { .val = 2, .div = 5, }, ··· 113 113 { } 114 114 }; 115 115 116 - static struct clk_div_table post_div_table[] = { 116 + static const struct clk_div_table post_div_table[] = { 117 117 { .val = 2, .div = 1, }, 118 118 { .val = 1, .div = 2, }, 119 119 { .val = 0, .div = 4, }, 120 120 { } 121 121 }; 122 122 123 - static struct clk_div_table video_div_table[] = { 123 + static const struct clk_div_table video_div_table[] = { 124 124 { .val = 0, .div = 1, }, 125 125 { .val = 1, .div = 2, }, 126 126 { .val = 2, .div = 1, },
+3 -3
drivers/clk/imx/clk-imx6ul.c
··· 78 78 IMX6UL_CLK_MMDC_P0_FAST, IMX6UL_CLK_MMDC_P0_IPG, 79 79 }; 80 80 81 - static struct clk_div_table clk_enet_ref_table[] = { 81 + static const struct clk_div_table clk_enet_ref_table[] = { 82 82 { .val = 0, .div = 20, }, 83 83 { .val = 1, .div = 10, }, 84 84 { .val = 2, .div = 5, }, ··· 86 86 { } 87 87 }; 88 88 89 - static struct clk_div_table post_div_table[] = { 89 + static const struct clk_div_table post_div_table[] = { 90 90 { .val = 2, .div = 1, }, 91 91 { .val = 1, .div = 2, }, 92 92 { .val = 0, .div = 4, }, 93 93 { } 94 94 }; 95 95 96 - static struct clk_div_table video_div_table[] = { 96 + static const struct clk_div_table video_div_table[] = { 97 97 { .val = 0, .div = 1, }, 98 98 { .val = 1, .div = 2, }, 99 99 { .val = 2, .div = 1, },
+2 -2
drivers/clk/imx/clk-imx7d.c
··· 27 27 static u32 share_count_sai3; 28 28 static u32 share_count_nand; 29 29 30 - static struct clk_div_table test_div_table[] = { 30 + static const struct clk_div_table test_div_table[] = { 31 31 { .val = 3, .div = 1, }, 32 32 { .val = 2, .div = 1, }, 33 33 { .val = 1, .div = 2, }, ··· 35 35 { } 36 36 }; 37 37 38 - static struct clk_div_table post_div_table[] = { 38 + static const struct clk_div_table post_div_table[] = { 39 39 { .val = 3, .div = 4, }, 40 40 { .val = 2, .div = 1, }, 41 41 { .val = 1, .div = 2, },
+1 -1
drivers/clk/imx/clk-vf610.c
··· 102 102 static const char *ftm_fix_sels[] = { "sxosc", "ipg_bus", }; 103 103 104 104 105 - static struct clk_div_table pll4_audio_div_table[] = { 105 + static const struct clk_div_table pll4_audio_div_table[] = { 106 106 { .val = 0, .div = 1 }, 107 107 { .val = 1, .div = 2 }, 108 108 { .val = 2, .div = 6 },