From ab7d91318bfc192ec38edaaabae06daa34b89a4d Mon Sep 17 00:00:00 2001 From: balrog Date: Mon, 2 Jun 2008 01:48:27 +0000 Subject: Fix smbus_eeprom.c compile with DEBUG (spotted by Duilio Protti). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4645 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/smbus_eeprom.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/smbus_eeprom.c b/hw/smbus_eeprom.c index 39cf1ce419..ce5f5f273e 100644 --- a/hw/smbus_eeprom.c +++ b/hw/smbus_eeprom.c @@ -37,7 +37,7 @@ typedef struct SMBusEEPROMDevice { static void eeprom_quick_cmd(SMBusDevice *dev, uint8_t read) { #ifdef DEBUG - printf("eeprom_quick_cmd: addr=0x%02x read=%d\n", dev->addr, read); + printf("eeprom_quick_cmd: addr=0x%02x read=%d\n", dev->i2c.address, read); #endif } @@ -45,7 +45,8 @@ static void eeprom_send_byte(SMBusDevice *dev, uint8_t val) { SMBusEEPROMDevice *eeprom = (SMBusEEPROMDevice *) dev; #ifdef DEBUG - printf("eeprom_send_byte: addr=0x%02x val=0x%02x\n", dev->addr, val); + printf("eeprom_send_byte: addr=0x%02x val=0x%02x\n", + dev->i2c.address, val); #endif eeprom->offset = val; } @@ -55,7 +56,8 @@ static uint8_t eeprom_receive_byte(SMBusDevice *dev) SMBusEEPROMDevice *eeprom = (SMBusEEPROMDevice *) dev; uint8_t val = eeprom->data[eeprom->offset++]; #ifdef DEBUG - printf("eeprom_receive_byte: addr=0x%02x val=0x%02x\n", dev->addr, val); + printf("eeprom_receive_byte: addr=0x%02x val=0x%02x\n", + dev->i2c.address, val); #endif return val; } @@ -65,8 +67,8 @@ static void eeprom_write_data(SMBusDevice *dev, uint8_t cmd, uint8_t *buf, int l SMBusEEPROMDevice *eeprom = (SMBusEEPROMDevice *) dev; int n; #ifdef DEBUG - printf("eeprom_write_byte: addr=0x%02x cmd=0x%02x val=0x%02x\n", dev->addr, - cmd, buf[0]); + printf("eeprom_write_byte: addr=0x%02x cmd=0x%02x val=0x%02x\n", + dev->i2c.address, cmd, buf[0]); #endif /* An page write operation is not a valid SMBus command. It is a block write without a length byte. Fortunately we -- cgit v1.2.3