Re: [PATCH 5/9] regulator/core: regulator_ena_gpio_ctrl: pull in ena_gpio state handling

From: Michał Mirosław
Date: Thu Aug 31 2023 - 08:36:50 EST


On Thu, Aug 31, 2023 at 12:13:16PM +0100, Mark Brown wrote:
> On Wed, Aug 30, 2023 at 11:38:56PM +0200, Michał Mirosław wrote:
>
> > - if (pin->enable_count > 1) {
> > - pin->enable_count--;
> > - return 0;
> > - }
> > -
> > /* Disable GPIO if not used */
> > - if (pin->enable_count <= 1) {
> > + if (pin->enable_count-- <= 1) {
>
> The goal isn't to write the minimum number of lines possible - this just
> makes the logic harder to follow and for bonus points isn't obviously
> related to the chnages described in changelog.

I see that I missed this fragment when splitting patches. I'll resend
without this part if the other ones are good to go.

Best Regards
Michał Mirosław