Skip to content

Commit cb8dbfe

Browse files
lkundrakbebarino
authored andcommitted
clk: mmp2: Constify some strings
All the parent clock names for the muxes are constant. Add const. Signed-off-by: Lubomir Rintel <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent b329638 commit cb8dbfe

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

drivers/clk/mmp/clk-mix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ const struct clk_ops mmp_clk_mix_ops = {
441441

442442
struct clk *mmp_clk_register_mix(struct device *dev,
443443
const char *name,
444-
const char **parent_names,
444+
const char * const *parent_names,
445445
u8 num_parents,
446446
unsigned long flags,
447447
struct mmp_clk_mix_config *config,

drivers/clk/mmp/clk-of-mmp2.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,16 @@ static void mmp2_pll_init(struct mmp2_clk_unit *pxa_unit)
127127
static DEFINE_SPINLOCK(uart0_lock);
128128
static DEFINE_SPINLOCK(uart1_lock);
129129
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"};
131131

132132
static DEFINE_SPINLOCK(ssp0_lock);
133133
static DEFINE_SPINLOCK(ssp1_lock);
134134
static DEFINE_SPINLOCK(ssp2_lock);
135135
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"};
137137

138138
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"};
140140

141141
static DEFINE_SPINLOCK(reset_lock);
142142

@@ -190,7 +190,7 @@ static void mmp2_apb_periph_clk_init(struct mmp2_clk_unit *pxa_unit)
190190
}
191191

192192
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"};
194194
static struct mmp_clk_mix_config sdh_mix_config = {
195195
.reg_info = DEFINE_MIX_REG_INFO(4, 10, 2, 8, 32),
196196
};
@@ -201,11 +201,12 @@ static DEFINE_SPINLOCK(usbhsic1_lock);
201201

202202
static DEFINE_SPINLOCK(disp0_lock);
203203
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"};
205205

206206
static DEFINE_SPINLOCK(ccic0_lock);
207207
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+
209210
static struct mmp_clk_mix_config ccic0_mix_config = {
210211
.reg_info = DEFINE_MIX_REG_INFO(4, 17, 2, 6, 32),
211212
};

drivers/clk/mmp/clk.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ struct mmp_clk_mix {
9797
extern const struct clk_ops mmp_clk_mix_ops;
9898
extern struct clk *mmp_clk_register_mix(struct device *dev,
9999
const char *name,
100-
const char **parent_names,
100+
const char * const *parent_names,
101101
u8 num_parents,
102102
unsigned long flags,
103103
struct mmp_clk_mix_config *config,
@@ -193,7 +193,7 @@ void mmp_register_gate_clks(struct mmp_clk_unit *unit,
193193
struct mmp_param_mux_clk {
194194
unsigned int id;
195195
char *name;
196-
const char **parent_name;
196+
const char * const *parent_name;
197197
u8 num_parents;
198198
unsigned long flags;
199199
unsigned long offset;

0 commit comments

Comments
 (0)