Skip to content

Commit fe9d25b

Browse files
Andi Kleenbebarino
authored andcommitted
clk: pistachio: Fix initconst confusion
A variable pointing to const isn't const itself. It has to contain "const" keyword after "*" too. So to keep it in __initconst (and not mark properly as __initdata), add the "const" keyword exactly there. Note we need to update struct pistachio_mux too. On the other hand, the clk core already counts with "const char *const" already. [js] more explanatory commit message. Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@kernel.org> Cc: linux-clk@vger.kernel.org Cc: Martin Liska <mliska@suse.cz> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220920055838.22637-1-jslaby@suse.cz Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 13b0452 commit fe9d25b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • drivers/clk/pistachio

drivers/clk/pistachio/clk.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ struct pistachio_mux {
3131
unsigned int shift;
3232
unsigned int num_parents;
3333
const char *name;
34-
const char **parents;
34+
const char *const *parents;
3535
};
3636

37-
#define PNAME(x) static const char *x[] __initconst
37+
#define PNAME(x) static const char *const x[] __initconst
3838

3939
#define MUX(_id, _name, _pnames, _reg, _shift) \
4040
{ \

0 commit comments

Comments
 (0)