提交 8f85c0af 编写于 作者: W Wolfram Sang 提交者: Benjamin Herrenschmidt

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: NWolfram Sang <w.sang@pengutronix.de>
Acked-by: NGrant Likely <grant.likely@secretlab.ca>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 7cad1978
...@@ -118,7 +118,7 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing) ...@@ -118,7 +118,7 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
u32 x; u32 x;
int result = 0; int result = 0;
if (i2c->irq == NO_IRQ) { if (!i2c->irq) {
while (!(readb(i2c->base + MPC_I2C_SR) & CSR_MIF)) { while (!(readb(i2c->base + MPC_I2C_SR) & CSR_MIF)) {
schedule(); schedule();
if (time_after(jiffies, orig_jiffies + timeout)) { if (time_after(jiffies, orig_jiffies + timeout)) {
...@@ -568,7 +568,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op, ...@@ -568,7 +568,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
} }
i2c->irq = irq_of_parse_and_map(op->node, 0); i2c->irq = irq_of_parse_and_map(op->node, 0);
if (i2c->irq != NO_IRQ) { /* i2c->irq = NO_IRQ implies polling */ if (i2c->irq) { /* no i2c->irq implies polling */
result = request_irq(i2c->irq, mpc_i2c_isr, result = request_irq(i2c->irq, mpc_i2c_isr,
IRQF_SHARED, "i2c-mpc", i2c); IRQF_SHARED, "i2c-mpc", i2c);
if (result < 0) { if (result < 0) {
...@@ -627,7 +627,7 @@ static int __devexit fsl_i2c_remove(struct of_device *op) ...@@ -627,7 +627,7 @@ static int __devexit fsl_i2c_remove(struct of_device *op)
i2c_del_adapter(&i2c->adap); i2c_del_adapter(&i2c->adap);
dev_set_drvdata(&op->dev, NULL); dev_set_drvdata(&op->dev, NULL);
if (i2c->irq != NO_IRQ) if (i2c->irq)
free_irq(i2c->irq, i2c); free_irq(i2c->irq, i2c);
irq_dispose_mapping(i2c->irq); irq_dispose_mapping(i2c->irq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册