[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170323201929.GD2502@dtor-ws>
Date: Thu, 23 Mar 2017 13:19:29 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
linux-gpio@...r.kernel.org, Hans de Goede <hdegoede@...hat.com>,
linux-kernel@...r.kernel.org,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
linux-acpi@...r.kernel.org
Subject: Re: [PATCH v1 3/8] gpio: acpi: Do sanity check for GpioInt in
acpi_find_gpio()
On Thu, Mar 23, 2017 at 09:46:13PM +0200, Andy Shevchenko wrote:
> Check that we don't ask for output direction on GpioInt resource in cases with
> or without _DSD defined.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> ---
> drivers/gpio/gpiolib-acpi.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index 3bda3166d418..21e4930ca2db 100644
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -614,12 +614,12 @@ struct gpio_desc *acpi_find_gpio(struct device *dev,
> desc = acpi_get_gpiod_by_index(adev, NULL, idx, &info);
> if (IS_ERR(desc))
> return desc;
> + }
>
> - if ((flags == GPIOD_OUT_LOW || flags == GPIOD_OUT_HIGH) &&
> - info.gpioint) {
> - dev_dbg(dev, "refusing GpioInt() entry when doing GPIOD_OUT_* lookup\n");
> - return ERR_PTR(-ENOENT);
> - }
> + if (info.gpioint &&
> + (flags == GPIOD_OUT_LOW || flags == GPIOD_OUT_HIGH)) {
> + dev_dbg(dev, "refusing GpioInt() entry when doing GPIOD_OUT_* lookup\n");
> + return ERR_PTR(-ENOENT);
> }
>
> if (info.polarity == GPIO_ACTIVE_LOW)
> --
> 2.11.0
>
--
Dmitry
Powered by blists - more mailing lists