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

From: Mark Brown
Date: Thu Aug 31 2023 - 07:13:30 EST


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.

Attachment: signature.asc
Description: PGP signature