summaryrefslogtreecommitdiff
path: root/hw/smbus_eeprom.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-02 01:48:27 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-02 01:48:27 +0000
commitab7d91318bfc192ec38edaaabae06daa34b89a4d (patch)
tree01c5b7b28d974a06f74db01588c4a604feca65e6 /hw/smbus_eeprom.c
parentb94eb43f6e1990e67bb31ad608b2a16bf38a58fe (diff)
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
Diffstat (limited to 'hw/smbus_eeprom.c')
-rw-r--r--hw/smbus_eeprom.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/smbus_eeprom.c b/hw/smbus_eeprom.c
index 39cf1ce41..ce5f5f273 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