Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196627
b: refs/heads/master
c: 13bb533
h: refs/heads/master
i:
  196625: 8b27cd7
  196623: eba319a
v: v3
  • Loading branch information
Wolfram Sang authored and Benjamin Herrenschmidt committed May 6, 2010
1 parent e79bb95 commit f9f2b5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6889f959b35d79166f9fb65aaddca1badb809d8f
refs/heads/master: 13bb5339966d49942878a46b0a7fda0639d7db5f
14 changes: 7 additions & 7 deletions trunk/drivers/i2c/busses/i2c-ibm_iic.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,12 @@ static int __devinit iic_request_irq(struct of_device *ofdev,
int irq;

if (iic_force_poll)
return NO_IRQ;
return 0;

irq = irq_of_parse_and_map(np, 0);
if (irq == NO_IRQ) {
if (!irq) {
dev_err(&ofdev->dev, "irq_of_parse_and_map failed\n");
return NO_IRQ;
return 0;
}

/* Disable interrupts until we finish initialization, assumes
Expand All @@ -683,7 +683,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev,
if (request_irq(irq, iic_handler, 0, "IBM IIC", dev)) {
dev_err(&ofdev->dev, "request_irq %d failed\n", irq);
/* Fallback to the polling mode */
return NO_IRQ;
return 0;
}

return irq;
Expand Down Expand Up @@ -719,7 +719,7 @@ static int __devinit iic_probe(struct of_device *ofdev,
init_waitqueue_head(&dev->wq);

dev->irq = iic_request_irq(ofdev, dev);
if (dev->irq == NO_IRQ)
if (!dev->irq)
dev_warn(&ofdev->dev, "using polling mode\n");

/* Board specific settings */
Expand Down Expand Up @@ -766,7 +766,7 @@ static int __devinit iic_probe(struct of_device *ofdev,
return 0;

error_cleanup:
if (dev->irq != NO_IRQ) {
if (dev->irq) {
iic_interrupt_mode(dev, 0);
free_irq(dev->irq, dev);
}
Expand All @@ -790,7 +790,7 @@ static int __devexit iic_remove(struct of_device *ofdev)

i2c_del_adapter(&dev->adap);

if (dev->irq != NO_IRQ) {
if (dev->irq) {
iic_interrupt_mode(dev, 0);
free_irq(dev->irq, dev);
}
Expand Down

0 comments on commit f9f2b5a

Please sign in to comment.