diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2009-10-04 07:08:16 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-19 19:19:01 -0400 |
commit | bf727e016f2a25d9f054317b2807e638706f1db6 (patch) | |
tree | 76ab4192d5843eb126a92dfe8f80972c879179c3 /drivers/i2c | |
parent | 0e53300818b08591516e5e528b33d70b83158d04 (diff) |
i2c-mpc: 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>
Cc: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-mpc.c | 6 |
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); |