summaryrefslogtreecommitdiff
path: root/hw/i2c/pm_smbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/i2c/pm_smbus.c')
-rw-r--r--hw/i2c/pm_smbus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/i2c/pm_smbus.c b/hw/i2c/pm_smbus.c
index f425ad893b..6df0fa916d 100644
--- a/hw/i2c/pm_smbus.c
+++ b/hw/i2c/pm_smbus.c
@@ -181,5 +181,6 @@ static const MemoryRegionOps pm_smbus_ops = {
void pm_smbus_init(DeviceState *parent, PMSMBus *smb)
{
smb->smbus = i2c_init_bus(parent, "i2c");
- memory_region_init_io(&smb->io, NULL, &pm_smbus_ops, smb, "pm-smbus", 64);
+ memory_region_init_io(&smb->io, OBJECT(parent), &pm_smbus_ops, smb,
+ "pm-smbus", 64);
}