dimm: Convert to DEFINE_PROP_LINK
commit2de7e26891db3d5b7f214fa485a5e946b17a57b9
authorFam Zheng <famz@redhat.com>
Fri, 14 Jul 2017 02:14:59 +0000 (14 10:14 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Jul 2017 10:04:43 +0000 (14 12:04 +0200)
tree7019d7d1718a5a3660a7c4fb4bd5d9ec72c7a8f6
parentaa8f057e74ae08014736a690ff41f76c756f75f1
dimm: Convert to DEFINE_PROP_LINK

Unlike the usual object_property_add_link() invocations in other
devices, dimm checks the "is mapped" state of the backend in addition to
qdev_prop_allow_set_link_before_realize. To convert it without
specializing DEFINE_PROP_LINK which always uses the qdev general check
callback, move the extra check to device realize time.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170714021509.23681-11-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/mem/pc-dimm.c