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

clk: mmp2: Constify some strings

All the parent clock names for the muxes are constant. Add const.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Link: https://lkml.kernel.org/r/20200309194254.29009-3-lkundrak@v3.sk
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Lubomir Rintel and committed by
Stephen Boyd
cb8dbfe8 b3296386

+10 -9
+1 -1
drivers/clk/mmp/clk-mix.c
··· 441 441 442 442 struct clk *mmp_clk_register_mix(struct device *dev, 443 443 const char *name, 444 - const char **parent_names, 444 + const char * const *parent_names, 445 445 u8 num_parents, 446 446 unsigned long flags, 447 447 struct mmp_clk_mix_config *config,
+7 -6
drivers/clk/mmp/clk-of-mmp2.c
··· 127 127 static DEFINE_SPINLOCK(uart0_lock); 128 128 static DEFINE_SPINLOCK(uart1_lock); 129 129 static DEFINE_SPINLOCK(uart2_lock); 130 - static const char *uart_parent_names[] = {"uart_pll", "vctcxo"}; 130 + static const char * const uart_parent_names[] = {"uart_pll", "vctcxo"}; 131 131 132 132 static DEFINE_SPINLOCK(ssp0_lock); 133 133 static DEFINE_SPINLOCK(ssp1_lock); 134 134 static DEFINE_SPINLOCK(ssp2_lock); 135 135 static DEFINE_SPINLOCK(ssp3_lock); 136 - static const char *ssp_parent_names[] = {"vctcxo_4", "vctcxo_2", "vctcxo", "pll1_16"}; 136 + static const char * const ssp_parent_names[] = {"vctcxo_4", "vctcxo_2", "vctcxo", "pll1_16"}; 137 137 138 138 static DEFINE_SPINLOCK(timer_lock); 139 - static const char *timer_parent_names[] = {"clk32", "vctcxo_4", "vctcxo_2", "vctcxo"}; 139 + static const char * const timer_parent_names[] = {"clk32", "vctcxo_4", "vctcxo_2", "vctcxo"}; 140 140 141 141 static DEFINE_SPINLOCK(reset_lock); 142 142 ··· 190 190 } 191 191 192 192 static DEFINE_SPINLOCK(sdh_lock); 193 - static const char *sdh_parent_names[] = {"pll1_4", "pll2", "usb_pll", "pll1"}; 193 + static const char * const sdh_parent_names[] = {"pll1_4", "pll2", "usb_pll", "pll1"}; 194 194 static struct mmp_clk_mix_config sdh_mix_config = { 195 195 .reg_info = DEFINE_MIX_REG_INFO(4, 10, 2, 8, 32), 196 196 }; ··· 201 201 202 202 static DEFINE_SPINLOCK(disp0_lock); 203 203 static DEFINE_SPINLOCK(disp1_lock); 204 - static const char *disp_parent_names[] = {"pll1", "pll1_16", "pll2", "vctcxo"}; 204 + static const char * const disp_parent_names[] = {"pll1", "pll1_16", "pll2", "vctcxo"}; 205 205 206 206 static DEFINE_SPINLOCK(ccic0_lock); 207 207 static DEFINE_SPINLOCK(ccic1_lock); 208 - static const char *ccic_parent_names[] = {"pll1_2", "pll1_16", "vctcxo"}; 208 + static const char * const ccic_parent_names[] = {"pll1_2", "pll1_16", "vctcxo"}; 209 + 209 210 static struct mmp_clk_mix_config ccic0_mix_config = { 210 211 .reg_info = DEFINE_MIX_REG_INFO(4, 17, 2, 6, 32), 211 212 };
+2 -2
drivers/clk/mmp/clk.h
··· 97 97 extern const struct clk_ops mmp_clk_mix_ops; 98 98 extern struct clk *mmp_clk_register_mix(struct device *dev, 99 99 const char *name, 100 - const char **parent_names, 100 + const char * const *parent_names, 101 101 u8 num_parents, 102 102 unsigned long flags, 103 103 struct mmp_clk_mix_config *config, ··· 193 193 struct mmp_param_mux_clk { 194 194 unsigned int id; 195 195 char *name; 196 - const char **parent_name; 196 + const char * const *parent_name; 197 197 u8 num_parents; 198 198 unsigned long flags; 199 199 unsigned long offset;