diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-29 20:25:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-29 20:25:48 -0500 |
commit | 9ca0e5474d11ca044e0aacfa6e78bf17957118d2 (patch) | |
tree | 2ffa4b51a73070e41b53644e0adfd39adf1eb501 /drivers/i2c/busses/i2c-pxa.c | |
parent | c0f79c4cb11acca545f9802ee0e14ad3b5cc123d (diff) | |
parent | 9f0f9313cec8c76c89bc8a68653f928fa12fab96 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 3914/1: [Jornada7xx] - Typo Fix in cpu-sa1110.c (b != B)
[ARM] 3913/1: n2100: fix IRQ routing for second ethernet port
[ARM] Add KBUILD_IMAGE target support
[ARM] Fix suspend oops caused by PXA2xx PCMCIA driver
[ARM] Fix i2c-pxa slave mode support
[ARM] 3900/1: Fix VFP Division by Zero exception handling.
[ARM] 3899/1: Fix the normalization of the denormal double precision number.
[ARM] 3909/1: Disable UWIND_INFO for ARM (again)
[ARM] Add __must_check to uaccess functions
[ARM] Add realview SMP default configuration
[ARM] Fix SMP irqflags support
Diffstat (limited to 'drivers/i2c/busses/i2c-pxa.c')
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 81050d3c9b21..c95a6c154165 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -272,7 +272,8 @@ static int i2c_pxa_wait_slave(struct pxa_i2c *i2c) | |||
272 | dev_dbg(&i2c->adap.dev, "%s: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n", | 272 | dev_dbg(&i2c->adap.dev, "%s: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n", |
273 | __func__, (long)jiffies, ISR, ICR, IBMR); | 273 | __func__, (long)jiffies, ISR, ICR, IBMR); |
274 | 274 | ||
275 | if ((ISR & (ISR_UB|ISR_IBB|ISR_SAD)) == ISR_SAD || | 275 | if ((ISR & (ISR_UB|ISR_IBB)) == 0 || |
276 | (ISR & ISR_SAD) != 0 || | ||
276 | (ICR & ICR_SCLE) == 0) { | 277 | (ICR & ICR_SCLE) == 0) { |
277 | if (i2c_debug > 1) | 278 | if (i2c_debug > 1) |
278 | dev_dbg(&i2c->adap.dev, "%s: done\n", __func__); | 279 | dev_dbg(&i2c->adap.dev, "%s: done\n", __func__); |
@@ -492,7 +493,10 @@ static void i2c_pxa_slave_txempty(struct pxa_i2c *i2c, u32 isr) | |||
492 | if (isr & ISR_BED) { | 493 | if (isr & ISR_BED) { |
493 | /* what should we do here? */ | 494 | /* what should we do here? */ |
494 | } else { | 495 | } else { |
495 | int ret = i2c->slave->read(i2c->slave->data); | 496 | int ret = 0; |
497 | |||
498 | if (i2c->slave != NULL) | ||
499 | ret = i2c->slave->read(i2c->slave->data); | ||
496 | 500 | ||
497 | IDBR = ret; | 501 | IDBR = ret; |
498 | ICR |= ICR_TB; /* allow next byte */ | 502 | ICR |= ICR_TB; /* allow next byte */ |