[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-2.0-rc0 02/31] qdev: Set DeviceClass::hotpluggabl
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL for-2.0-rc0 02/31] qdev: Set DeviceClass::hotpluggable default in class_init() |
Date: |
Wed, 12 Mar 2014 22:09:34 +0100 |
From: Igor Mammedov <address@hidden>
Move setting DeviceClass::hotpluggable default from device's
class_base_init() to device's class_init().
Reported-by: Andreas Färber <address@hidden>
Signed-off-by: Igor Mammedov <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
hw/core/qdev.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 5377893..71b7045 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -793,14 +793,6 @@ static void device_class_base_init(ObjectClass *class,
void *data)
* so do not propagate them to the subclasses.
*/
klass->props = NULL;
-
- /* by default all devices were considered as hotpluggable,
- * so with intent to check it in generic qdev_unplug() /
- * device_set_realized() functions make every device
- * hotpluggable. Devices that shouldn't be hotpluggable,
- * should override it in their class_init()
- */
- klass->hotpluggable = true;
}
static void device_unparent(Object *obj)
@@ -846,6 +838,14 @@ static void device_class_init(ObjectClass *class, void
*data)
class->unparent = device_unparent;
dc->realize = device_realize;
dc->unrealize = device_unrealize;
+
+ /* by default all devices were considered as hotpluggable,
+ * so with intent to check it in generic qdev_unplug() /
+ * device_set_realized() functions make every device
+ * hotpluggable. Devices that shouldn't be hotpluggable,
+ * should override it in their class_init()
+ */
+ dc->hotpluggable = true;
}
void device_reset(DeviceState *dev)
--
1.8.4.5
- [Qemu-devel] [PULL for-2.0-rc0 00/31] QOM devices patch queue 2014-03-12, Andreas Färber, 2014/03/12
- [Qemu-devel] [PULL for-2.0-rc0 02/31] qdev: Set DeviceClass::hotpluggable default in class_init(),
Andreas Färber <=
- [Qemu-devel] [PULL for-2.0-rc0 04/31] qom: Avoid leaking str and bool properties on failure, Andreas Färber, 2014/03/12
- [Qemu-devel] [PULL for-2.0-rc0 07/31] misc/max111x: Create abstract max111x type, Andreas Färber, 2014/03/12
- [Qemu-devel] [PULL for-2.0-rc0 05/31] ssi: Convert legacy SSI_SLAVE -> DEVICE casts, Andreas Färber, 2014/03/12
- [Qemu-devel] [PULL for-2.0-rc0 01/31] qdev: Fix bus dependency of DeviceState::hotpluggable getter, Andreas Färber, 2014/03/12
- [Qemu-devel] [PULL for-2.0-rc0 11/31] spapr-pci: Change the default PCI bus naming, Andreas Färber, 2014/03/12
- [Qemu-devel] [PULL for-2.0-rc0 12/31] qdev-monitor-test: Simplify using g_assert_cmpstr(), Andreas Färber, 2014/03/12
- [Qemu-devel] [PULL for-2.0-rc0 13/31] qdev-monitor-test: Don't test human-readable error message, Andreas Färber, 2014/03/12
- [Qemu-devel] [PULL for-2.0-rc0 15/31] vl: Use MachineClass instead of global QEMUMachine list, Andreas Färber, 2014/03/12
- [Qemu-devel] [PULL for-2.0-rc0 08/31] misc/max111x: QOM casting sweep, Andreas Färber, 2014/03/12
- [Qemu-devel] [PULL for-2.0-rc0 09/31] ssi: Remove SSI_SLAVE_FROM_QDEV() macro, Andreas Färber, 2014/03/12