Re: [PATCH v1 1/5] regmap: mmio: Don't unprepare attached clock

From: Mark Brown
Date: Mon Aug 08 2022 - 09:07:24 EST


On Fri, Aug 05, 2022 at 11:53:17PM +0300, Andy Shevchenko wrote:
> The commit eb4a219d19fd ("regmap: Skip clk_put for attached clocks when
> freeing context") oexcluded clk_put() call on regmap freeing. But the
> same is needed for clk_unprepare() since the regmap MMIO users should
> call regmap_mmio_detach_clk() which does unprepare the clock. Update
> the code accordingly, so neither clk_put() nor clk_unprepare() would
> be called for the attached clock.

regmap_mmio_attach_clk() prepares the clock that's passed in, we should
undo that when detaching otherwise we're leaking a prepare (as we do in
the explicit detach).

Attachment: signature.asc
Description: PGP signature