public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: rdc321x: Fix off-by-one for ngpio setting
@ 2014-04-25  1:24 Axel Lin
  2014-04-28 10:30 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-04-25  1:24 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Linus Walleij, Alexandre Courbot, Florian Fainelli

The valid gpio is GPIO0 ~ GPIO58, so ngpio should be 59.
This patch also renames RDC321X_MAX_GPIO to RDC321X_NUM_GPIO because it
actually means the number of available GPIOs.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/mfd/rdc321x-southbridge.c | 2 +-
 include/linux/mfd/rdc321x.h       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/rdc321x-southbridge.c b/drivers/mfd/rdc321x-southbridge.c
index c795697..6575585 100644
--- a/drivers/mfd/rdc321x-southbridge.c
+++ b/drivers/mfd/rdc321x-southbridge.c
@@ -38,7 +38,7 @@ static struct resource rdc321x_wdt_resource[] = {
 };
 
 static struct rdc321x_gpio_pdata rdc321x_gpio_pdata = {
-	.max_gpios	= RDC321X_MAX_GPIO,
+	.max_gpios	= RDC321X_NUM_GPIO,
 };
 
 static struct resource rdc321x_gpio_resources[] = {
diff --git a/include/linux/mfd/rdc321x.h b/include/linux/mfd/rdc321x.h
index 4bdf19c..442743a 100644
--- a/include/linux/mfd/rdc321x.h
+++ b/include/linux/mfd/rdc321x.h
@@ -12,7 +12,7 @@
 #define RDC321X_GPIO_CTRL_REG2	0x84
 #define RDC321X_GPIO_DATA_REG2	0x88
 
-#define RDC321X_MAX_GPIO	58
+#define RDC321X_NUM_GPIO	59
 
 struct rdc321x_gpio_pdata {
 	struct pci_dev *sb_pdev;
-- 
1.8.3.2




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: rdc321x: Fix off-by-one for ngpio setting
  2014-04-25  1:24 [PATCH] mfd: rdc321x: Fix off-by-one for ngpio setting Axel Lin
@ 2014-04-28 10:30 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2014-04-28 10:30 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Linus Walleij, Alexandre Courbot, Florian Fainelli

> The valid gpio is GPIO0 ~ GPIO58, so ngpio should be 59.
> This patch also renames RDC321X_MAX_GPIO to RDC321X_NUM_GPIO because it
> actually means the number of available GPIOs.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/mfd/rdc321x-southbridge.c | 2 +-
>  include/linux/mfd/rdc321x.h       | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-28 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25  1:24 [PATCH] mfd: rdc321x: Fix off-by-one for ngpio setting Axel Lin
2014-04-28 10:30 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox