Merge branch 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux

* 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux:
  i2c: Fix stuck transaction on cpm-i2c driver
  i2c-omap: Fix build breaking typo cpu_is_omap_2430
This commit is contained in:
Linus Torvalds 2009-06-22 12:44:14 -07:00
commit b5bdd43876
2 changed files with 4 additions and 4 deletions

View File

@ -140,7 +140,7 @@ static irqreturn_t cpm_i2c_interrupt(int irq, void *dev_id)
dev_dbg(&adap->dev, "Interrupt: %x\n", i); dev_dbg(&adap->dev, "Interrupt: %x\n", i);
wake_up_interruptible(&cpm->i2c_wait); wake_up(&cpm->i2c_wait);
return i ? IRQ_HANDLED : IRQ_NONE; return i ? IRQ_HANDLED : IRQ_NONE;
} }
@ -364,12 +364,12 @@ static int cpm_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
dev_dbg(&adap->dev, "test ready.\n"); dev_dbg(&adap->dev, "test ready.\n");
pmsg = &msgs[tptr]; pmsg = &msgs[tptr];
if (pmsg->flags & I2C_M_RD) if (pmsg->flags & I2C_M_RD)
ret = wait_event_interruptible_timeout(cpm->i2c_wait, ret = wait_event_timeout(cpm->i2c_wait,
(in_be16(&tbdf[tptr].cbd_sc) & BD_SC_NAK) || (in_be16(&tbdf[tptr].cbd_sc) & BD_SC_NAK) ||
!(in_be16(&rbdf[rptr].cbd_sc) & BD_SC_EMPTY), !(in_be16(&rbdf[rptr].cbd_sc) & BD_SC_EMPTY),
1 * HZ); 1 * HZ);
else else
ret = wait_event_interruptible_timeout(cpm->i2c_wait, ret = wait_event_timeout(cpm->i2c_wait,
!(in_be16(&tbdf[tptr].cbd_sc) & BD_SC_READY), !(in_be16(&tbdf[tptr].cbd_sc) & BD_SC_READY),
1 * HZ); 1 * HZ);
if (ret == 0) { if (ret == 0) {

View File

@ -339,7 +339,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
* to get longer filter period for better noise suppression. * to get longer filter period for better noise suppression.
* The filter is iclk (fclk for HS) period. * The filter is iclk (fclk for HS) period.
*/ */
if (dev->speed > 400 || cpu_is_omap_2430()) if (dev->speed > 400 || cpu_is_omap2430())
internal_clk = 19200; internal_clk = 19200;
else if (dev->speed > 100) else if (dev->speed > 100)
internal_clk = 9600; internal_clk = 9600;