aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-03-07 20:42:08 +0100
committerWolfram Sang <wsa@the-dreams.de>2018-03-20 12:01:02 +0100
commit6bdacac5a07b451932f004bb1c3b04ad5c176fd2 (patch)
tree3aa8a60876e9ec5109bf81001c88154019efedb2
parent6a5ce8a4d8f05150667a682d7433389146e59571 (diff)
downloadqemu-at24c.tar.gz
nvram: at24c: consistently populate the EEPROMState pointerat24c
Always use the macro for doing that. WIP: is this correct? Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-rw-r--r--hw/nvram/eeprom_at24c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/nvram/eeprom_at24c.c b/hw/nvram/eeprom_at24c.c
index c35b29e503e..33479bd602f 100644
--- a/hw/nvram/eeprom_at24c.c
+++ b/hw/nvram/eeprom_at24c.c
@@ -50,7 +50,7 @@ typedef struct EEPROMState {
static
int at24c_eeprom_event(I2CSlave *s, enum i2c_event event)
{
- EEPROMState *ee = container_of(s, EEPROMState, parent_obj);
+ EEPROMState *ee = AT24C_EE(s);
switch (event) {
case I2C_START_SEND: