aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Kuribayashi2009-11-06 21:46:29 +0900
committerBen Dooks2009-12-09 00:19:10 +0000
commit6d2ea4875f7e5e495526bdfd32bce093cb130276 (patch)
treeb1e206c59343bb5ce9fd6de4b82bb92a257d33b6
parente77cf23251e7f55335d986ee0a6d2c0084889dee (diff)
i2c-designware: Remove an useless local variable "num"
We couldn't know the original intent for this variable, but at this point it's useless. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com> Acked-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
-rw-r--r--drivers/i2c/busses/i2c-designware.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c
index 443f398a2156..fd1616b3d2b5 100644
--- a/drivers/i2c/busses/i2c-designware.c
+++ b/drivers/i2c/busses/i2c-designware.c
@@ -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);
@@ -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
@@ -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;