Re: [PATCH] i2c: ensure timely release of driver-allocated resources

From: Wolfram Sang
Date: Sat Apr 10 2021 - 16:01:27 EST


On Sun, Mar 21, 2021 at 06:38:32PM -0700, Dmitry Torokhov wrote:
> More and more drivers rely on devres to manage their resources, however
> if bus' probe() and release() methods are not trivial and control some
> of resources as well (for example enable or disable clocks, or attach
> device to a power domain), we need to make sure that driver-allocated
> resources are released immediately after driver's remove() method
> returns, and not postponed until driver core gets around to releasing
> resources. To fix that we open a new devres group before calling
> driver's probe() and explicitly release it when we return from driver's
> remove().
>
> Tested-by: Jeff LaBundy <jeff@xxxxxxxxxxx>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

Applied to for-next, thanks!

Attachment: signature.asc
Description: PGP signature