aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/atmel_nand.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 23e5d77c39fc..4dd056e2e16a 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)
113 */ 113 */
114static void atmel_nand_enable(struct atmel_nand_host *host) 114static void atmel_nand_enable(struct atmel_nand_host *host)
115{ 115{
116 if (host->board->enable_pin) 116 if (gpio_is_valid(host->board->enable_pin))
117 gpio_set_value(host->board->enable_pin, 0); 117 gpio_set_value(host->board->enable_pin, 0);
118} 118}
119 119
@@ -122,7 +122,7 @@ static void atmel_nand_enable(struct atmel_nand_host *host)
122 */ 122 */
123static void atmel_nand_disable(struct atmel_nand_host *host) 123static void atmel_nand_disable(struct atmel_nand_host *host)
124{ 124{
125 if (host->board->enable_pin) 125 if (gpio_is_valid(host->board->enable_pin))
126 gpio_set_value(host->board->enable_pin, 1); 126 gpio_set_value(host->board->enable_pin, 1);
127} 127}
128 128
@@ -492,7 +492,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
492 nand_chip->IO_ADDR_W = host->io_base; 492 nand_chip->IO_ADDR_W = host->io_base;
493 nand_chip->cmd_ctrl = atmel_nand_cmd_ctrl; 493 nand_chip->cmd_ctrl = atmel_nand_cmd_ctrl;
494 494
495 if (host->board->rdy_pin) 495 if (gpio_is_valid(host->board->rdy_pin))
496 nand_chip->dev_ready = atmel_nand_device_ready; 496 nand_chip->dev_ready = atmel_nand_device_ready;
497 497
498 regs = platform_get_resource(pdev, IORESOURCE_MEM, 1); 498 regs = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -530,7 +530,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
530 platform_set_drvdata(pdev, host); 530 platform_set_drvdata(pdev, host);
531 atmel_nand_enable(host); 531 atmel_nand_enable(host);
532 532
533 if (host->board->det_pin) { 533 if (gpio_is_valid(host->board->det_pin)) {
534 if (gpio_get_value(host->board->det_pin)) { 534 if (gpio_get_value(host->board->det_pin)) {
535 printk(KERN_INFO "No SmartMedia card inserted.\n"); 535 printk(KERN_INFO "No SmartMedia card inserted.\n");
536 res = -ENXIO; 536 res = -ENXIO;