From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>, <linux-gpio@vger.kernel.org>
Cc: <prabhakar.csengg@gmail.com>, <nsekhar@ti.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
<linux-kernel@vger.kernel.org>,
Grygorii Strashko <grygorii.strashko@ti.com>
Subject: [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO
Date: Thu, 21 Nov 2013 17:34:35 +0200 [thread overview]
Message-ID: <1385048076-7875-2-git-send-email-grygorii.strashko@ti.com> (raw)
In-Reply-To: <1385048076-7875-1-git-send-email-grygorii.strashko@ti.com>
Since Davinci GPIO driver is moved to support gpiolib it has to use
ARCH_NR_GPIOS (can be configured using CONFIG_ARCH_NR_GPIO Kconfig
option) configuration instead of any mach/platform specific options.
Hence, replace private DAVINCI_N_GPIO with common ARCH_NR_GPIOS. This is
safe because default value for ARCH_NR_GPIOS=256 and maximum number of
supported GPIOs for Davinci is DAVINCI_N_GPIO=144.
More over, this is one of steps to re-use Davinci GPIO driver by other
mach/platform.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
drivers/gpio/gpio-davinci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 1f33fcd..944c819 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -160,8 +160,8 @@ static int davinci_gpio_probe(struct platform_device *pdev)
return -EINVAL;
}
- if (WARN_ON(DAVINCI_N_GPIO < ngpio))
- ngpio = DAVINCI_N_GPIO;
+ if (WARN_ON(ARCH_NR_GPIOS < ngpio))
+ ngpio = ARCH_NR_GPIOS;
chips = devm_kzalloc(dev,
ngpio * sizeof(struct davinci_gpio_controller),
--
1.7.9.5
next prev parent reply other threads:[~2013-11-21 15:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 15:34 [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone Grygorii Strashko
2013-11-21 15:34 ` Grygorii Strashko [this message]
2013-11-26 10:27 ` [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO Prabhakar Lad
2013-11-29 8:33 ` Linus Walleij
2013-12-15 11:57 ` Sekhar Nori
2013-11-21 15:34 ` [PATCH 2/2] gpio: introduce GPIO_DAVINCI kconfig option Grygorii Strashko
2013-11-26 10:29 ` Prabhakar Lad
2013-11-29 8:35 ` Linus Walleij
2013-12-15 12:04 ` Sekhar Nori
2013-11-29 15:41 ` [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone Santosh Shilimkar
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=1385048076-7875-2-git-send-email-grygorii.strashko@ti.com \
--to=grygorii.strashko@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=prabhakar.csengg@gmail.com \
--cc=santosh.shilimkar@ti.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
Powered by JetHome