diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-09-19 03:29:53 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-11-29 10:46:15 -0500 |
commit | 477c87e90853d136b188c50c0e4a93d01cad872e (patch) | |
tree | e795ddad10a13779be77c0297616ea1177ba5fac /drivers/ata | |
parent | cc9f9aef6ad3ebdda911e25b38222c215f7634f9 (diff) |
ARM: at91/pata: use gpio_is_valid to check the gpio
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_at91.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c index a76f24a8e5db..5249e6d918a3 100644 --- a/drivers/ata/pata_at91.c +++ b/drivers/ata/pata_at91.c | |||
@@ -360,7 +360,7 @@ static int __devinit pata_at91_probe(struct platform_device *pdev) | |||
360 | ap->flags |= ATA_FLAG_SLAVE_POSS; | 360 | ap->flags |= ATA_FLAG_SLAVE_POSS; |
361 | ap->pio_mask = ATA_PIO4; | 361 | ap->pio_mask = ATA_PIO4; |
362 | 362 | ||
363 | if (!irq) { | 363 | if (!gpio_is_valid(irq)) { |
364 | ap->flags |= ATA_FLAG_PIO_POLLING; | 364 | ap->flags |= ATA_FLAG_PIO_POLLING; |
365 | ata_port_desc(ap, "no IRQ, using PIO polling"); | 365 | ata_port_desc(ap, "no IRQ, using PIO polling"); |
366 | } | 366 | } |
@@ -414,8 +414,8 @@ static int __devinit pata_at91_probe(struct platform_device *pdev) | |||
414 | 414 | ||
415 | host->private_data = info; | 415 | host->private_data = info; |
416 | 416 | ||
417 | ret = ata_host_activate(host, irq ? gpio_to_irq(irq) : 0, | 417 | return ata_host_activate(host, gpio_is_valid(irq) ? gpio_to_irq(irq) : 0, |
418 | irq ? ata_sff_interrupt : NULL, | 418 | gpio_is_valid(irq) ? ata_sff_interrupt : NULL, |
419 | irq_flags, &pata_at91_sht); | 419 | irq_flags, &pata_at91_sht); |
420 | 420 | ||
421 | if (!ret) | 421 | if (!ret) |