Commit f5c009db authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Stephen Boyd

clk: spear: Make structure i2s_sclk_masks constant

Static structure i2s_sclk_masks, having type aux_clk_masks, is only used
when it is passed as the sixth argument to function clk_register_aux().
However, clk_register_aux() is defined with its sixth argument as const.
Hence i2s_sclk_masks is not modified by clk_register_aux, which is also
the only usage of the former. Therefore make i2s_sclk_masks constant as
it is never modified.
Issue found with Coccinelle.
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lkml.kernel.org/r/20190813085714.8079-1-nishkadg.linux@gmail.comAcked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 5f9e832c
...@@ -335,7 +335,7 @@ static const struct aux_clk_masks i2s_prs1_masks = { ...@@ -335,7 +335,7 @@ static const struct aux_clk_masks i2s_prs1_masks = {
}; };
/* i2s sclk (bit clock) syynthesizers masks */ /* i2s sclk (bit clock) syynthesizers masks */
static struct aux_clk_masks i2s_sclk_masks = { static const struct aux_clk_masks i2s_sclk_masks = {
.eq_sel_mask = AUX_EQ_SEL_MASK, .eq_sel_mask = AUX_EQ_SEL_MASK,
.eq_sel_shift = SPEAR1340_I2S_SCLK_EQ_SEL_SHIFT, .eq_sel_shift = SPEAR1340_I2S_SCLK_EQ_SEL_SHIFT,
.eq1_mask = AUX_EQ1_SEL, .eq1_mask = AUX_EQ1_SEL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment