Re: [PATCH 2/3] regulator: Only free GPIOs if the core requested them

From: Linus Walleij
Date: Thu Nov 22 2018 - 17:25:59 EST


On Thu, Nov 22, 2018 at 6:30 PM Charles Keepax
<ckeepax@xxxxxxxxxxxxxxxxxxxxx> wrote:

> Currently, the regulator core will take ownership of any GPIO passed
> into it. Makes end driver code fairly error prone as the normal devm_
> patterns of allocation don't work. Update the regulator core to only
> free the GPIO if it requested it, this allows the drivers to manage the
> GPIO lifetime as they normally would.
>
> Reported-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

This patch is slightly prettier than mine.

Thanks!
Linus Walleij