[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5bd92c5a-86e4-6779-6035-f9a0b33917e9@ti.com>
Date: Fri, 12 Apr 2019 16:02:11 +0530
From: Sekhar Nori <nsekhar@...com>
To: Bartosz Golaszewski <brgl@...ev.pl>,
Kevin Hilman <khilman@...nel.org>,
Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v4 6/6] usb: ohci-da8xx: drop the vbus GPIO
Hi Bartosz,
On 11/04/19 3:00 PM, Bartosz Golaszewski wrote:
> @@ -209,9 +197,7 @@ static irqreturn_t ohci_da8xx_oc_thread(int irq, void *data)
> int ret;
>
> if (gpiod_get_value_cansleep(da8xx_ohci->oc_gpio)) {
> - if (da8xx_ohci->vbus_gpio) {
> - gpiod_set_value_cansleep(da8xx_ohci->vbus_gpio, 0);
> - } else if (da8xx_ohci->vbus_reg) {
> + if (da8xx_ohci->vbus_reg) {
> ret = regulator_disable(da8xx_ohci->vbus_reg);
> if (ret)
> dev_err(dev,
You can now reduce a level of indentation here by doing
if (gpiod_get_value_cansleep(da8xx_ohci->oc_gpio) &&
da8xx_ohci->vbus_reg) {
ret = regulator_disable(da8xx_ohci->vbus_reg);
if (ret)
dev_err(dev, "Failed to disable regulator: %d\n",
ret);
}
Thanks
Sekhar
Powered by blists - more mailing lists