Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299587
b: refs/heads/master
c: 3027691
h: refs/heads/master
i:
  299585: 57a0b0a
  299583: 1edab61
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Apr 23, 2012
1 parent 25ac2d7 commit c8dea08
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ef822c55371b20548d4f58193c580407a5d738d
refs/heads/master: 3027691e58bfb21f6ea2e9f1d225d11b4e2b20e2
9 changes: 9 additions & 0 deletions trunk/arch/powerpc/platforms/powermac/low_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,20 @@ static void kw_i2c_timeout(unsigned long data)
unsigned long flags;

spin_lock_irqsave(&host->lock, flags);

/*
* If the timer is pending, that means we raced with the
* irq, in which case we just return
*/
if (timer_pending(&host->timeout_timer))
goto skip;

kw_i2c_handle_interrupt(host, kw_read_reg(reg_isr));
if (host->state != state_idle) {
host->timeout_timer.expires = jiffies + KW_POLL_TIMEOUT;
add_timer(&host->timeout_timer);
}
skip:
spin_unlock_irqrestore(&host->lock, flags);
}

Expand Down

0 comments on commit c8dea08

Please sign in to comment.