All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Andy Shevchenko
	<andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	MyungJoo Ham
	<myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	David Cohen
	<david.a.cohen-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH v1 1/3] extcon: int3496: Propagate error code of gpiod_to_irq()
Date: Fri, 24 Feb 2017 10:09:49 +0900	[thread overview]
Message-ID: <58AF87DD.3030308@samsung.com> (raw)
In-Reply-To: <20170223103156.109643-1-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

On 2017년 02월 23일 19:31, Andy Shevchenko wrote:
> gpiod_to_irq() doesn't return 0. Thus, we just adjust condition and
> replace -EINVAL by actual error code it returns.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> ---
>  drivers/extcon/extcon-intel-int3496.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
> index a3131b036de6..38eb6cab938f 100644
> --- a/drivers/extcon/extcon-intel-int3496.c
> +++ b/drivers/extcon/extcon-intel-int3496.c
> @@ -100,9 +100,9 @@ static int int3496_probe(struct platform_device *pdev)
>  	}
>  
>  	data->usb_id_irq = gpiod_to_irq(data->gpio_usb_id);
> -	if (data->usb_id_irq <= 0) {
> +	if (data->usb_id_irq < 0) {
>  		dev_err(dev, "can't get USB ID IRQ: %d\n", data->usb_id_irq);
> -		return -EINVAL;
> +		return data->usb_id_irq;
>  	}
>  
>  	data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus en",
> 

Applied it. Thanks.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, David Cohen <david.a.cohen@intel.com>,
	Felipe Balbi <balbi@kernel.org>
Subject: Re: [PATCH v1 1/3] extcon: int3496: Propagate error code of gpiod_to_irq()
Date: Fri, 24 Feb 2017 10:09:49 +0900	[thread overview]
Message-ID: <58AF87DD.3030308@samsung.com> (raw)
In-Reply-To: <20170223103156.109643-1-andriy.shevchenko@linux.intel.com>

On 2017년 02월 23일 19:31, Andy Shevchenko wrote:
> gpiod_to_irq() doesn't return 0. Thus, we just adjust condition and
> replace -EINVAL by actual error code it returns.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/extcon/extcon-intel-int3496.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
> index a3131b036de6..38eb6cab938f 100644
> --- a/drivers/extcon/extcon-intel-int3496.c
> +++ b/drivers/extcon/extcon-intel-int3496.c
> @@ -100,9 +100,9 @@ static int int3496_probe(struct platform_device *pdev)
>  	}
>  
>  	data->usb_id_irq = gpiod_to_irq(data->gpio_usb_id);
> -	if (data->usb_id_irq <= 0) {
> +	if (data->usb_id_irq < 0) {
>  		dev_err(dev, "can't get USB ID IRQ: %d\n", data->usb_id_irq);
> -		return -EINVAL;
> +		return data->usb_id_irq;
>  	}
>  
>  	data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus en",
> 

Applied it. Thanks.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

  parent reply	other threads:[~2017-02-24  1:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170223103303epcas3p496d768c3638368e98a9f6d95cb13380b@epcas3p4.samsung.com>
2017-02-23 10:31 ` [PATCH v1 1/3] extcon: int3496: Propagate error code of gpiod_to_irq() Andy Shevchenko
     [not found]   ` <20170223103156.109643-1-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-02-23 10:31     ` [PATCH v1 2/3] extcon: int3496: Rename GPIO pins in accordance with binding Andy Shevchenko
2017-02-23 10:31       ` Andy Shevchenko
2017-02-24  1:17       ` Chanwoo Choi
     [not found]         ` <58AF8998.5000601-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-02-24 12:08           ` Andy Shevchenko
2017-02-24 12:08             ` Andy Shevchenko
2017-02-24  1:09     ` Chanwoo Choi [this message]
2017-02-24  1:09       ` [PATCH v1 1/3] extcon: int3496: Propagate error code of gpiod_to_irq() Chanwoo Choi
2017-02-23 10:31   ` [PATCH v1 3/3] extcon: int3496: Add GPIO ACPI mapping table Andy Shevchenko
2017-02-24  1:30     ` Chanwoo Choi

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=58AF87DD.3030308@samsung.com \
    --to=cw00.choi-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
    --cc=andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=david.a.cohen-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.