Re: [PATCH v2] regmap: detach regmap from dev on regmap_exit

From: Mark Brown
Date: Thu Nov 28 2024 - 07:54:58 EST


On Wed, Nov 27, 2024 at 11:22:31PM +0200, Cosmin Tanislav wrote:
> At the end of __regmap_init(), if dev is not NULL, regmap_attach_dev()
> is called, which adds a devres reference to the regmap, to be able to
> retrieve a dev's regmap by name using dev_get_regmap().
>
> When calling regmap_exit, the opposite does not happen, and the
> reference is kept until the dev is detached.
>
> Add a regmap_detach_dev() function, export it and call it in
> regmap_exit(), to make sure that the devres reference is not kept.
>
> V2:
> * switch to static function

As covered in submitting-patches.rst the inter version changelog should
go after the --- so it is automatically discarded by tooling.

Attachment: signature.asc
Description: PGP signature