aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-mpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-mpc.c')
-rw-r--r--drivers/i2c/busses/i2c-mpc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index f1321f763789..e86cef300c7d 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -118,7 +118,7 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
118 u32 x; 118 u32 x;
119 int result = 0; 119 int result = 0;
120 120
121 if (i2c->irq == NO_IRQ) { 121 if (!i2c->irq) {
122 while (!(readb(i2c->base + MPC_I2C_SR) & CSR_MIF)) { 122 while (!(readb(i2c->base + MPC_I2C_SR) & CSR_MIF)) {
123 schedule(); 123 schedule();
124 if (time_after(jiffies, orig_jiffies + timeout)) { 124 if (time_after(jiffies, orig_jiffies + timeout)) {
@@ -568,7 +568,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
568 } 568 }
569 569
570 i2c->irq = irq_of_parse_and_map(op->node, 0); 570 i2c->irq = irq_of_parse_and_map(op->node, 0);
571 if (i2c->irq != NO_IRQ) { /* i2c->irq = NO_IRQ implies polling */ 571 if (i2c->irq) { /* no i2c->irq implies polling */
572 result = request_irq(i2c->irq, mpc_i2c_isr, 572 result = request_irq(i2c->irq, mpc_i2c_isr,
573 IRQF_SHARED, "i2c-mpc", i2c); 573 IRQF_SHARED, "i2c-mpc", i2c);
574 if (result < 0) { 574 if (result < 0) {
@@ -627,7 +627,7 @@ static int __devexit fsl_i2c_remove(struct of_device *op)
627 i2c_del_adapter(&i2c->adap); 627 i2c_del_adapter(&i2c->adap);
628 dev_set_drvdata(&op->dev, NULL); 628 dev_set_drvdata(&op->dev, NULL);
629 629
630 if (i2c->irq != NO_IRQ) 630 if (i2c->irq)
631 free_irq(i2c->irq, i2c); 631 free_irq(i2c->irq, i2c);
632 632
633 irq_dispose_mapping(i2c->irq); 633 irq_dispose_mapping(i2c->irq);