Re: [PATCH] clk: Check ops are available in clk_gate_restore_context

From: Stephen Boyd
Date: Tue Apr 09 2024 - 07:35:11 EST


Quoting Cristian Marussi (2024-01-20 02:07:11)
> Add a check in clk_gate_restore_context() to assure that the clock enable
> and disable ops are available before calling them.
>
> CC: Michael Turquette <mturquette@xxxxxxxxxxxx>
> CC: Stephen Boyd <sboyd@xxxxxxxxxx>
> CC: linux-clk@xxxxxxxxxxxxxxx
> Fixes: 9be766274db4 ("clk: Clean up suspend/resume coding style")
> Signed-off-by: Cristian Marussi <cristian.marussi@xxxxxxx>
> ---
> Spotted this by code inspection.
> I may be missing something, though, given my limited familiarity with CLK.

It assumes this is for a gate clk, which has enable/disable clk ops.
Also, only TI uses this code and I suggest you don't use it.