Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 19, 2018 at 04:26:54PM -0800, Douglas Anderson wrote:
> In regulator_force_disable() there was a strange loop that looked like:
> 
>   while (rdev->open_count--)
>     regulator_disable(rdev->supply);
> 
> I'm not totally sure what the goal was for this loop, but it seems
> wrong to me.  If anything I think maybe we should have been looping
> over our use_count, but even that might be a little strange.  For now
> let's just remove the code and we can add something back in if someone
> can explain what's expected.

This should be using use_count, what that loop is doing is dropping all
the enables that the regulator being force disabled had propagated up
all the enables it passed up the chain of supplies.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux