qdev: Simplify the SysBusDeviceClass::init path
commitdbfe00130e4b0cd34d06d693a060655b4f7e95b4
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 28 May 2018 14:45:08 +0000 (28 16:45 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 1 Jun 2018 13:14:31 +0000 (1 15:14 +0200)
tree9fecdf4e5134662fecdb2e46bf124a550c41fa12
parentc8c9e1039434b907ee982f3be04f81576bd1f588
qdev: Simplify the SysBusDeviceClass::init path

Instead of using
  SysBusDeviceClass::realize
   -> DeviceClass::realize
       -> DeviceClass::init
           -> sysbus_device_init
              -> SysBusDeviceClass::init

Simplify the path by directly calling SysBusDeviceClass::init
in SysBusDeviceClass::realize:

  SysBusDeviceClass::realize
   -> SysBusDeviceClass::init

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180419212727.26095-4-f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Removal of DeviceClass::init() moved into next patch,
sysbus_realize() tweaked for clarity]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180528144509.15812-4-armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/core/sysbus.c