Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193184
b: refs/heads/master
c: bf727e0
h: refs/heads/master
v: v3
  • Loading branch information
Wolfram Sang authored and Ben Dooks committed May 19, 2010
1 parent 48c72f2 commit 4774599
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 0e53300818b08591516e5e528b33d70b83158d04
refs/heads/master: bf727e016f2a25d9f054317b2807e638706f1db6
6 changes: 3 additions & 3 deletions trunk/drivers/i2c/busses/i2c-mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
u32 x;
int result = 0;

if (i2c->irq == NO_IRQ) {
if (!i2c->irq) {
while (!(readb(i2c->base + MPC_I2C_SR) & CSR_MIF)) {
schedule();
if (time_after(jiffies, orig_jiffies + timeout)) {
Expand Down Expand Up @@ -568,7 +568,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
}

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,
IRQF_SHARED, "i2c-mpc", i2c);
if (result < 0) {
Expand Down Expand Up @@ -627,7 +627,7 @@ static int __devexit fsl_i2c_remove(struct of_device *op)
i2c_del_adapter(&i2c->adap);
dev_set_drvdata(&op->dev, NULL);

if (i2c->irq != NO_IRQ)
if (i2c->irq)
free_irq(i2c->irq, i2c);

irq_dispose_mapping(i2c->irq);
Expand Down

0 comments on commit 4774599

Please sign in to comment.