public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Alex Courbot <acourbot@nvidia.com>,
	linux-gpio@vger.kernel.org,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH] gpio / ACPI: return -ENOENT when no mapping exists
Date: Thu, 12 Dec 2013 02:39:13 +0100	[thread overview]
Message-ID: <1818897.EILY1COPGZ@vostro.rjw.lan> (raw)
In-Reply-To: <1386669627-31365-1-git-send-email-mika.westerberg@linux.intel.com>

On Tuesday, December 10, 2013 12:00:27 PM Mika Westerberg wrote:
> Doing this allows drivers to distinguish between a real error case (if
> there was an error when we tried to resolve the GPIO) and when the optional
> GPIO line was not available.
> 
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  drivers/gpio/gpiolib-acpi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index 8506e4ce41f7..716ee9843110 100644
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -307,7 +307,7 @@ struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index,
>  	if (lookup.desc && info)
>  		*info = lookup.info;
>  
> -	return lookup.desc ? lookup.desc : ERR_PTR(-ENODEV);
> +	return lookup.desc ? lookup.desc : ERR_PTR(-ENOENT);
>  }
>  
>  void acpi_gpiochip_add(struct gpio_chip *chip)
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  parent reply	other threads:[~2013-12-12  1:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 10:00 [PATCH] gpio / ACPI: return -ENOENT when no mapping exists Mika Westerberg
2013-12-10 11:11 ` Alex Courbot
2013-12-12  1:39 ` Rafael J. Wysocki [this message]
2013-12-12 20:57 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1818897.EILY1COPGZ@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=acourbot@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox