aboutsummaryrefslogtreecommitdiff
path: root/hw/nvram/eeprom_at24c.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/nvram/eeprom_at24c.c')
-rw-r--r--hw/nvram/eeprom_at24c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/nvram/eeprom_at24c.c b/hw/nvram/eeprom_at24c.c
index df3eef1389..2d4d8b952f 100644
--- a/hw/nvram/eeprom_at24c.c
+++ b/hw/nvram/eeprom_at24c.c
@@ -64,7 +64,7 @@ int at24c_eeprom_event(I2CSlave *s, enum i2c_event event)
case I2C_START_RECV:
DPRINTK("clear\n");
if (ee->blk && ee->changed) {
- int ret = blk_pwrite(ee->blk, 0, ee->mem, ee->rsize, 0);
+ int ret = blk_pwrite(ee->blk, 0, ee->rsize, ee->mem, 0);
if (ret < 0) {
ERR(TYPE_AT24C_EE
" : failed to write backing file\n");
@@ -165,7 +165,7 @@ void at24c_eeprom_reset(DeviceState *state)
memset(ee->mem, 0, ee->rsize);
if (ee->blk) {
- int ret = blk_pread(ee->blk, 0, ee->mem, ee->rsize, 0);
+ int ret = blk_pread(ee->blk, 0, ee->rsize, ee->mem, 0);
if (ret < 0) {
ERR(TYPE_AT24C_EE