Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173850
b: refs/heads/master
c: 6d2ea48
h: refs/heads/master
v: v3
  • Loading branch information
Shinya Kuribayashi authored and Ben Dooks committed Dec 9, 2009
1 parent 305a5cf commit 4b82872
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: e77cf23251e7f55335d986ee0a6d2c0084889dee
refs/heads/master: 6d2ea4875f7e5e495526bdfd32bce093cb130276
6 changes: 2 additions & 4 deletions trunk/drivers/i2c/busses/i2c-designware.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ static void
i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
{
struct i2c_msg *msgs = dev->msgs;
int num = dev->msgs_num;
u32 ic_con, intr_mask;
int tx_limit = dev->tx_fifo_depth - readl(dev->base + DW_IC_TXFLR);
int rx_limit = dev->rx_fifo_depth - readl(dev->base + DW_IC_RXFLR);
Expand All @@ -283,7 +282,7 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
writel(1, dev->base + DW_IC_ENABLE);
}

for (; dev->msg_write_idx < num; dev->msg_write_idx++) {
for (; dev->msg_write_idx < dev->msgs_num; dev->msg_write_idx++) {
/* if target address has changed, we need to
* reprogram the target address in the i2c
* adapter when we are done with this transfer
Expand Down Expand Up @@ -330,11 +329,10 @@ static void
i2c_dw_read(struct dw_i2c_dev *dev)
{
struct i2c_msg *msgs = dev->msgs;
int num = dev->msgs_num;
u32 addr = msgs[dev->msg_read_idx].addr;
int rx_valid = readl(dev->base + DW_IC_RXFLR);

for (; dev->msg_read_idx < num; dev->msg_read_idx++) {
for (; dev->msg_read_idx < dev->msgs_num; dev->msg_read_idx++) {
u32 len;
u8 *buf;

Expand Down

0 comments on commit 4b82872

Please sign in to comment.