aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
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 }