]> www.infradead.org Git - users/willy/xarray.git/commit
clk: at91: sama7g5: Allocate only the needed amount of memory for PLLs
authorClaudiu Beznea <claudiu.beznea@tuxon.dev>
Sun, 14 Jul 2024 14:13:15 +0000 (17:13 +0300)
committerClaudiu Beznea <claudiu.beznea@tuxon.dev>
Sat, 24 Aug 2024 14:44:11 +0000 (17:44 +0300)
commit2d6e9ee7cb3e79b1713783c633b13af9aeffc90c
tree8643ceae32f7f09ac55a62a1dc44bd8b116a2f8e
parent33013b43e2715c7e061ae052825edd87fd278330
clk: at91: sama7g5: Allocate only the needed amount of memory for PLLs

The maximum number of PLL components on SAMA7G5 is 3 (one fractional
part and 2 dividers). Allocate the needed amount of memory for
sama7g5_plls 2d array. Previous code used to allocate 7 array entries for
each PLL. While at it, replace 3 with PLL_COMPID_MAX in the loop which
parses the sama7g5_plls 2d array.

Fixes: cb783bbbcf54 ("clk: at91: sama7g5: add clock support for sama7g5")
Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240714141315.19480-1-claudiu.beznea@tuxon.dev
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
drivers/clk/at91/sama7g5.c