Re: [PATCH v2 3/4] clk: hisilicon: Convert to platform driver

From: Stephen Boyd
Date: Wed Apr 05 2023 - 17:09:12 EST


Quoting David Yang (2023-03-29 00:50:52)
> - clk_data);
> - hisi_clk_register_fixed_factor(hi3620_fixed_factor_clks,
> - ARRAY_SIZE(hi3620_fixed_factor_clks),
> - clk_data);
> - hisi_clk_register_mux(hi3620_mux_clks, ARRAY_SIZE(hi3620_mux_clks),
> - clk_data);
> - hisi_clk_register_divider(hi3620_div_clks, ARRAY_SIZE(hi3620_div_clks),
> - clk_data);
> - hisi_clk_register_gate_sep(hi3620_separated_gate_clks,
> - ARRAY_SIZE(hi3620_separated_gate_clks),
> - clk_data);
> -}
> -CLK_OF_DECLARE(hi3620_clk, "hisilicon,hi3620-clock", hi3620_clk_init);
> +static const struct hisi_clocks hi3620_clks = {
> + .nr = HI3620_NR_CLKS,

Can this simply be calculated by adding together all the _num members?

> + .fixed_rate_clks = hi3620_fixed_rate_clks,
> + .fixed_rate_clks_num = ARRAY_SIZE(hi3620_fixed_rate_clks),
> + .fixed_factor_clks = hi3620_fixed_factor_clks,
> + .fixed_factor_clks_num = ARRAY_SIZE(hi3620_fixed_factor_clks),
> + .mux_clks = hi3620_mux_clks,
> + .mux_clks_num = ARRAY_SIZE(hi3620_mux_clks),
> + .divider_clks = hi3620_div_clks