Add vmstate_qdev_no_state_to_migrate, which is simply a
pointer to vmstate_no_state_to_migrate. This way all
qdev devices (including "hw/qdev-core.h") don't have to
include "migration/vmstate.h".
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/qdev-core.h | 2 ++
hw/core/qdev.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index fe78073c70..2e4ddfd75f 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -139,6 +139,8 @@ typedef struct DeviceClass {
const char *bus_type;
} DeviceClass;
+extern const VMStateDescription *vmstate_qdev_no_state_to_migrate;
+
typedef struct NamedGPIOList NamedGPIOList;
struct NamedGPIOList {
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 2131c7f951..0d18bc6d93 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -45,6 +45,9 @@ bool qdev_hotplug = false;
static bool qdev_hot_added = false;
bool qdev_hot_removed = false;
+const VMStateDescription *vmstate_qdev_no_state_to_migrate =
+ &vmstate_no_state_to_migrate;
+
const VMStateDescription *qdev_get_vmsd(DeviceState *dev)
{
DeviceClass *dc = DEVICE_GET_CLASS(dev);
--
2.21.3