aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev-addr.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-09 03:58:10 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-01-15 18:26:30 -0600
commit7983c8a335dd09fec49f99a44d4404aa87828c0a (patch)
treec69919e4bfc2de020b0d9b12df47bfd8527aa50d /hw/qdev-addr.c
parent2c9ee0291f8ca7e18f8e96a34e8f4be7867219d2 (diff)
qdev: Fold state enum into bool realized
Whether the device was initialized or not is QOM-level information and currently unused. Drop it from device. This leaves the boolean state of whether or not DeviceClass::init was called or not, a.k.a. "realized". Suggested-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev-addr.c')
-rw-r--r--hw/qdev-addr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/qdev-addr.c b/hw/qdev-addr.c
index 3bfe101d79..b4388f6a66 100644
--- a/hw/qdev-addr.c
+++ b/hw/qdev-addr.c
@@ -40,7 +40,7 @@ static void set_taddr(Object *obj, Visitor *v, void *opaque,
Error *local_err = NULL;
int64_t value;
- if (dev->state != DEV_STATE_CREATED) {
+ if (dev->realized) {
error_set(errp, QERR_PERMISSION_DENIED);
return;
}