s390x/sclp: add device to the sysbus in sclp_realize
commit8b638c43afa8d756d803a0ef6ef42213d612984f
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 23 Nov 2015 12:03:08 +0000 (23 13:03 +0100)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Wed, 27 Jan 2016 14:34:47 +0000 (27 15:34 +0100)
tree324fd5fee3f12a7312cbd14237e5e48d9e583d83
parent52c6cfb74908060c3d209fa4c9b2a62c3ff76ff2
s390x/sclp: add device to the sysbus in sclp_realize

The init of a device should have no side effects. Therefore move
registering of the event facility into the realize function, so
multiple instances of the SCLP device can be created e.g. for
introspection.

Add some more detail as to why we have to add it to the sysbus
at all.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/sclp.c