diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2015-02-18 10:59:45 +0100 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2015-04-12 17:18:27 -0700 |
commit | 692d8328e8c039f9497eb862c6cf835de922c061 (patch) | |
tree | bb58cdf8ee1f91581681ce69013e9e280b0fe56f /drivers/clk/rockchip/clk.h | |
parent | f6194213cbe871341cd5dfcfe31b4de78ef9503f (diff) |
clk: don't use __initconst for non-const arrays
The statement
static const char *name[];
defines a modifiable array of pointers to constant chars. That is
*name[0] = 'f';
is forbidden, but
name[0] = "f";
is not. So marking an array that is defined as above with __initconst is
wrong. Either an additional const must be added such that the whole
definition reads:
static const char *const name[] __initconst;
or where this is not possible __initdata must be used.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/rockchip/clk.h')
-rw-r--r-- | drivers/clk/rockchip/clk.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h index 58d2e3bdf22f..e63cafe893e1 100644 --- a/drivers/clk/rockchip/clk.h +++ b/drivers/clk/rockchip/clk.h @@ -182,7 +182,7 @@ struct clk *rockchip_clk_register_mmc(const char *name, const char **parent_names, u8 num_parents, void __iomem *reg, int shift); -#define PNAME(x) static const char *x[] __initconst +#define PNAME(x) static const char *x[] __initdata enum rockchip_clk_branch_type { branch_composite, @@ -407,7 +407,7 @@ void rockchip_clk_register_armclk(unsigned int lookup_id, const char *name, const struct rockchip_cpuclk_reg_data *reg_data, const struct rockchip_cpuclk_rate_table *rates, int nrates); -void rockchip_clk_protect_critical(const char *clocks[], int nclocks); +void rockchip_clk_protect_critical(const char *const clocks[], int nclocks); void rockchip_register_restart_notifier(unsigned int reg); #define ROCKCHIP_SOFTRST_HIWORD_MASK BIT(0) |