7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Miquel Raynal [ Upstream commit 26ec588063d9b6c70773b8729372e2bf6d3ea95a ] The number of clocks is not a binding since this is a value that can change. As such, in order to support the missing watchdog clocks and allow the deprecation and removal of CLK_MAX_IDX from the bindings, we need to switch to a local definition first. Signed-off-by: Miquel Raynal Link: https://patch.msgid.link/20260930-perso-ma35d1-upstream-clk-v6-1-48937ee6c9bb@bootlin.com Signed-off-by: Jerome Brunet Signed-off-by: Brian Masney Stable-dep-of: 1dc3871ce7ec ("clk: nuvoton: ma35d1: Add missing WDT/WWDT parent clocks") Signed-off-by: Sasha Levin --- drivers/clk/nuvoton/clk-ma35d1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clk/nuvoton/clk-ma35d1.c b/drivers/clk/nuvoton/clk-ma35d1.c index 9f65d0623517a..6aa42a3e1be3b 100644 --- a/drivers/clk/nuvoton/clk-ma35d1.c +++ b/drivers/clk/nuvoton/clk-ma35d1.c @@ -17,6 +17,7 @@ static DEFINE_SPINLOCK(ma35d1_lock); #define PLL_MAX_NUM 5 +#define MA35D1_CLK_COUNT 236 /* Clock Control Registers Offset */ #define REG_CLK_PWRCTL 0x00 @@ -467,12 +468,12 @@ static int ma35d1_clocks_probe(struct platform_device *pdev) int ret; ma35d1_hw_data = devm_kzalloc(dev, - struct_size(ma35d1_hw_data, hws, CLK_MAX_IDX), + struct_size(ma35d1_hw_data, hws, MA35D1_CLK_COUNT), GFP_KERNEL); if (!ma35d1_hw_data) return -ENOMEM; - ma35d1_hw_data->num = CLK_MAX_IDX; + ma35d1_hw_data->num = MA35D1_CLK_COUNT; hws = ma35d1_hw_data->hws; clk_base = devm_platform_ioremap_resource(pdev, 0); -- 2.53.0