aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2009-10-04 07:08:16 -0400
committerBen Dooks <ben-linux@fluff.org>2010-05-19 19:19:01 -0400
commitf0ec9e20bab214f4a26e6fdaaf5c2a6b2f2640d7 (patch)
tree9c277c9500f2aadb9914d64159af3970785d9f6c /drivers/i2c
parentb865a4e7ab3c6c8099fbe83ddf94c982d1d850ea (diff)
i2c-ibm-iic: drop NO_IRQ
Drop NO_IRQ as 0 is the preferred way to describe 'no irq' (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the driver is only used on powerpc, where NO_IRQ is 0 anyhow. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sean MacLennan <smaclennan@pikatech.com> Cc: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index b1bc6e277d2a..2bef534cbff1 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -668,12 +668,12 @@ static int __devinit iic_request_irq(struct of_device *ofdev,
668 int irq; 668 int irq;
669 669
670 if (iic_force_poll) 670 if (iic_force_poll)
671 return NO_IRQ; 671 return 0;
672 672
673 irq = irq_of_parse_and_map(np, 0); 673 irq = irq_of_parse_and_map(np, 0);
674 if (irq == NO_IRQ) { 674 if (!irq) {
675 dev_err(&ofdev->dev, "irq_of_parse_and_map failed\n"); 675 dev_err(&ofdev->dev, "irq_of_parse_and_map failed\n");
676 return NO_IRQ; 676 return 0;
677 } 677 }
678 678
679 /* Disable interrupts until we finish initialization, assumes 679 /* Disable interrupts until we finish initialization, assumes
@@ -683,7 +683,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev,
683 if (request_irq(irq, iic_handler, 0, "IBM IIC", dev)) { 683 if (request_irq(irq, iic_handler, 0, "IBM IIC", dev)) {
684 dev_err(&ofdev->dev, "request_irq %d failed\n", irq); 684 dev_err(&ofdev->dev, "request_irq %d failed\n", irq);
685 /* Fallback to the polling mode */ 685 /* Fallback to the polling mode */
686 return NO_IRQ; 686 return 0;
687 } 687 }
688 688
689 return irq; 689 return irq;
@@ -719,7 +719,7 @@ static int __devinit iic_probe(struct of_device *ofdev,
719 init_waitqueue_head(&dev->wq); 719 init_waitqueue_head(&dev->wq);
720 720
721 dev->irq = iic_request_irq(ofdev, dev); 721 dev->irq = iic_request_irq(ofdev, dev);
722 if (dev->irq == NO_IRQ) 722 if (!dev->irq)
723 dev_warn(&ofdev->dev, "using polling mode\n"); 723 dev_warn(&ofdev->dev, "using polling mode\n");
724 724
725 /* Board specific settings */ 725 /* Board specific settings */
@@ -766,7 +766,7 @@ static int __devinit iic_probe(struct of_device *ofdev,
766 return 0; 766 return 0;
767 767
768error_cleanup: 768error_cleanup:
769 if (dev->irq != NO_IRQ) { 769 if (dev->irq) {
770 iic_interrupt_mode(dev, 0); 770 iic_interrupt_mode(dev, 0);
771 free_irq(dev->irq, dev); 771 free_irq(dev->irq, dev);
772 } 772 }
@@ -790,7 +790,7 @@ static int __devexit iic_remove(struct of_device *ofdev)
790 790
791 i2c_del_adapter(&dev->adap); 791 i2c_del_adapter(&dev->adap);
792 792
793 if (dev->irq != NO_IRQ) { 793 if (dev->irq) {
794 iic_interrupt_mode(dev, 0); 794 iic_interrupt_mode(dev, 0);
795 free_irq(dev->irq, dev); 795 free_irq(dev->irq, dev);
796 } 796 }