From: plagnioj@jcrosoft.com (Jean-Christophe PLAGNIOL-VILLARD)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/11 v2] ARM: at92/nand: use gpio_is_valid to check the gpio
Date: Wed, 21 Sep 2011 13:30:41 +0200 [thread overview]
Message-ID: <1316604645-22599-7-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20110921112830.GP24966@game.jcrosoft.org>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
V2 update commit log
Best Regards,
J. drivers/mtd/nand/atmel_nand.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 55da20c..e20ac1f 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -113,7 +113,7 @@ static int cpu_has_dma(void)
*/
static void atmel_nand_enable(struct atmel_nand_host *host)
{
- if (host->board->enable_pin)
+ if (gpio_is_valid(host->board->enable_pin))
gpio_set_value(host->board->enable_pin, 0);
}
@@ -122,7 +122,7 @@ static void atmel_nand_enable(struct atmel_nand_host *host)
*/
static void atmel_nand_disable(struct atmel_nand_host *host)
{
- if (host->board->enable_pin)
+ if (gpio_is_valid(host->board->enable_pin))
gpio_set_value(host->board->enable_pin, 1);
}
@@ -535,7 +535,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
nand_chip->IO_ADDR_W = host->io_base;
nand_chip->cmd_ctrl = atmel_nand_cmd_ctrl;
- if (host->board->rdy_pin)
+ if (gpio_is_valid(host->board->rdy_pin))
nand_chip->dev_ready = atmel_nand_device_ready;
regs = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -573,7 +573,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, host);
atmel_nand_enable(host);
- if (host->board->det_pin) {
+ if (gpio_is_valid(host->board->det_pin)) {
if (gpio_get_value(host->board->det_pin)) {
printk(KERN_INFO "No SmartMedia card inserted.\n");
res = -ENXIO;
--
1.7.6.3
next prev parent reply other threads:[~2011-09-21 11:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 11:28 [PATCH 0/11 v2] ARM: AT91: update gpio implementation Jean-Christophe PLAGNIOL-VILLARD
2011-09-21 11:30 ` [PATCH 01/11 V2] ARM: at91/gpio: make gpio register base soc independant Jean-Christophe PLAGNIOL-VILLARD
2011-09-21 11:30 ` [PATCH 02/11 vw] ARM: at91/boards: use -EINVAL for invalid gpio Jean-Christophe PLAGNIOL-VILLARD
2011-09-21 11:30 ` [PATCH 03/11 V2] ARM: at91/soc: use gpio_is_valid to check the gpio Jean-Christophe PLAGNIOL-VILLARD
2011-09-21 11:30 ` [PATCH 04/11 v2] ARM: at91/pata: " Jean-Christophe PLAGNIOL-VILLARD
2011-09-21 11:30 ` [PATCH 05/11 v2] ARM: at91/ide: " Jean-Christophe PLAGNIOL-VILLARD
2011-09-21 11:30 ` [PATCH 06/11 v2] ARM: at91/mmc: " Jean-Christophe PLAGNIOL-VILLARD
2011-09-21 11:30 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-09-21 11:30 ` [PATCH 08/11 v2] ARM: at92/udc: " Jean-Christophe PLAGNIOL-VILLARD
2011-09-21 11:30 ` [PATCH 09/11 v2] ARM: at92/ohci: " Jean-Christophe PLAGNIOL-VILLARD
2011-09-21 11:30 ` [PATCH 10/11 v2] ARM: at91/gpio: drop PIN_BASE Jean-Christophe PLAGNIOL-VILLARD
2011-09-21 11:30 ` [PATCH 11/11 v2] ARM: at91/gpio: fix display of number of irq setuped Jean-Christophe PLAGNIOL-VILLARD
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=1316604645-22599-7-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox