Re: [PATCH 2/3] clk: eswin: Add eic7700 HSP clock driver

From: Benoît Monin

Date: Fri Apr 03 2026 - 09:01:25 EST


On Fri, 03 Apr 2026 17:36:12 +0800, dongxuyang@xxxxxxxxxxxxxxxxxx <dongxuyang@xxxxxxxxxxxxxxxxxx> wrote:
> diff --git a/drivers/clk/eswin/clk-eic7700-hsp.c b/drivers/clk/eswin/clk-eic7700-hsp.c
> new file mode 100644
> index 000000000000..65ad9e762ee9
> --- /dev/null
> +++ b/drivers/clk/eswin/clk-eic7700-hsp.c
> @@ -0,0 +1,339 @@
> [ ... skip 64 lines ... ]
> +{
> + struct eic7700_hsp_clk_gate *gate = to_gate_clk(hw);
> + unsigned long flags;
> + u32 reg;
> +
> + spin_lock_irqsave(gate->lock, flags);

You can use guard(spinlock_irqsave)(gate->lock) instead, and drop the unlock.

--
Benoît Monin, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com