浏览代码

mod_i2c_mem() bugfix

The last used chip, address, and address length were not being
stored for the imm and imn commands.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Peter Tyser 16 年之前
父节点
当前提交
0800707b6d
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      common/cmd_i2c.c

+ 3 - 3
common/cmd_i2c.c

@@ -529,9 +529,9 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
 		}
 	} while (nbytes);
 
-	chip = i2c_mm_last_chip;
-	addr = i2c_mm_last_addr;
-	alen = i2c_mm_last_alen;
+	i2c_mm_last_chip = chip;
+	i2c_mm_last_addr = addr;
+	i2c_mm_last_alen = alen;
 
 	return 0;
 }