aboutsummaryrefslogtreecommitdiff
path: root/hw/i2c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-09-25 12:21:29 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-09-26 16:39:20 +0200
commit973d3ea5a1c0573149b7004108276ca01cb05fd2 (patch)
tree24faec5329b4f08bdd7da4492a4c60bb1d25a65d /hw/i2c
parent4c186847ee0080a76dfef874322d634c429d43ad (diff)
pm_smbus: rename variable to avoid shadowing
Acked-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i2c')
-rw-r--r--hw/i2c/pm_smbus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/i2c/pm_smbus.c b/hw/i2c/pm_smbus.c
index 9ad6a47739..4e1b8a5182 100644
--- a/hw/i2c/pm_smbus.c
+++ b/hw/i2c/pm_smbus.c
@@ -279,7 +279,7 @@ static void smb_ioport_writeb(void *opaque, hwaddr addr, uint64_t val,
if (!read && s->smb_index == s->smb_data0) {
uint8_t prot = (s->smb_ctl >> 2) & 0x07;
uint8_t cmd = s->smb_cmd;
- uint8_t addr = s->smb_addr >> 1;
+ uint8_t smb_addr = s->smb_addr >> 1;
int ret;
if (prot == PROT_I2C_BLOCK_READ) {
@@ -287,7 +287,7 @@ static void smb_ioport_writeb(void *opaque, hwaddr addr, uint64_t val,
goto out;
}
- ret = smbus_write_block(s->smbus, addr, cmd, s->smb_data,
+ ret = smbus_write_block(s->smbus, smb_addr, cmd, s->smb_data,
s->smb_data0, !s->i2c_enable);
if (ret < 0) {
s->smb_stat |= STS_DEV_ERR;