All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: Axel Lin <axel.lin@ingics.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Subject: Re: [PATCH 1/2] gpio: rdc321x: Fix off-by-one for ngpio setting
Date: Sun, 20 Apr 2014 11:31:48 -0700	[thread overview]
Message-ID: <53541294.304@openwrt.org> (raw)
In-Reply-To: <1397196885.12922.2.camel@phoenix>

Le 10/04/2014 23:14, Axel Lin a écrit :
> The valid gpio is GPIO0 ~ GPIO58, so ngpio should be RDC321X_MAX_GPIO + 1.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>   drivers/gpio/gpio-rdc321x.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-rdc321x.c b/drivers/gpio/gpio-rdc321x.c
> index 88577c3..9e7da2d 100644
> --- a/drivers/gpio/gpio-rdc321x.c
> +++ b/drivers/gpio/gpio-rdc321x.c
> @@ -176,7 +176,7 @@ static int rdc321x_gpio_probe(struct platform_device *pdev)
>   	rdc321x_gpio_dev->chip.get = rdc_gpio_get_value;
>   	rdc321x_gpio_dev->chip.set = rdc_gpio_set_value;
>   	rdc321x_gpio_dev->chip.base = 0;
> -	rdc321x_gpio_dev->chip.ngpio = pdata->max_gpios;
> +	rdc321x_gpio_dev->chip.ngpio = pdata->max_gpios + 1;
>
>   	platform_set_drvdata(pdev, rdc321x_gpio_dev);
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-04-20 18:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11  6:14 [PATCH 1/2] gpio: rdc321x: Fix off-by-one for ngpio setting Axel Lin
2014-04-11  6:16 ` [PATCH 2/2] gpio: rdc321x: Convert to use devm_kzalloc Axel Lin
2014-04-20 18:32   ` Florian Fainelli
2014-04-23 13:27   ` Linus Walleij
2014-04-20 18:31 ` Florian Fainelli [this message]
2014-04-23 13:25 ` [PATCH 1/2] gpio: rdc321x: Fix off-by-one for ngpio setting Linus Walleij
2014-04-23 14:00   ` Axel Lin
2014-04-23 21:53     ` Linus Walleij
2014-04-23 21:55       ` Florian Fainelli

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=53541294.304@openwrt.org \
    --to=florian@openwrt.org \
    --cc=axel.lin@ingics.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.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.