diff mbox series

powerpc/512x: clk: constify clk_div_table

Message ID 90eacc5c9ff738176330dd53e128c945a88ead9f.1503900231.git.arvind.yadav.cs@gmail.com (mailing list archive)
State Accepted
Commit 9e2b70fbbc451cc56863644f6e7349148f7482cf
Headers show
Series powerpc/512x: clk: constify clk_div_table | expand

Commit Message

Arvind Yadav Aug. 28, 2017, 6:05 a.m. UTC
clk_div_table are not supposed to change at runtime.
mpc512x_clk_divtable function working with const
clk_div_table. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 arch/powerpc/platforms/512x/clock-commonclk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Ellerman Aug. 31, 2017, 11:36 a.m. UTC | #1
On Mon, 2017-08-28 at 06:05:15 UTC, Arvind Yadav wrote:
> clk_div_table are not supposed to change at runtime.
> mpc512x_clk_divtable function working with const
> clk_div_table. So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/9e2b70fbbc451cc56863644f6e7349

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/platforms/512x/clock-commonclk.c b/arch/powerpc/platforms/512x/clock-commonclk.c
index add5a53..b3097fe 100644
--- a/arch/powerpc/platforms/512x/clock-commonclk.c
+++ b/arch/powerpc/platforms/512x/clock-commonclk.c
@@ -363,7 +363,7 @@  static int get_cpmf_mult_x2(void)
  */
 
 /* applies to the IPS_DIV, and PCI_DIV values */
-static struct clk_div_table divtab_2346[] = {
+static const struct clk_div_table divtab_2346[] = {
 	{ .val = 2, .div = 2, },
 	{ .val = 3, .div = 3, },
 	{ .val = 4, .div = 4, },
@@ -372,7 +372,7 @@  static int get_cpmf_mult_x2(void)
 };
 
 /* applies to the MBX_DIV, LPC_DIV, and NFC_DIV values */
-static struct clk_div_table divtab_1234[] = {
+static const struct clk_div_table divtab_1234[] = {
 	{ .val = 1, .div = 1, },
 	{ .val = 2, .div = 2, },
 	{ .val = 3, .div = 3, },