提交 6783ecf1 编写于 作者: P Peter Maydell 提交者: Andreas Färber

hw: Avoid use of QOM type name macros in VMStateDescriptions

The name field in a VMStateDescription is part of the migration state
versioning, so changing it will break migration.  It's therefore a
bad idea to use a QOM typename macro to initialize it, because in
general we're free to rename QOM types as part of code refactoring
and cleanup.  For the handful of devices that were doing this by
mistake, replace the QOM typenames with the corresponding literal
strings.
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
[AF: Use TYPE_PVSCSI for TypeInfo instead]
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 3464700f
......@@ -271,7 +271,7 @@ static const MemoryRegionOps exynos4210_i2c_ops = {
};
static const VMStateDescription exynos4210_i2c_vmstate = {
.name = TYPE_EXYNOS4_I2C,
.name = "exynos4210.i2c",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
......
......@@ -1136,7 +1136,7 @@ pvscsi_post_load(void *opaque, int version_id)
}
static const VMStateDescription vmstate_pvscsi = {
.name = TYPE_PVSCSI,
.name = "pvscsi",
.version_id = 0,
.minimum_version_id = 0,
.minimum_version_id_old = 0,
......@@ -1201,7 +1201,7 @@ static void pvscsi_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo pvscsi_info = {
.name = "pvscsi",
.name = TYPE_PVSCSI,
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(PVSCSIState),
.class_init = pvscsi_class_init,
......
......@@ -370,7 +370,7 @@ static const MemoryRegionOps imx_epit_ops = {
};
static const VMStateDescription vmstate_imx_timer_epit = {
.name = TYPE_IMX_EPIT,
.name = "imx.epit",
.version_id = 2,
.minimum_version_id = 2,
.minimum_version_id_old = 2,
......
......@@ -142,7 +142,7 @@ typedef struct {
} IMXGPTState;
static const VMStateDescription vmstate_imx_timer_gpt = {
.name = TYPE_IMX_GPT,
.name = "imx.gpt",
.version_id = 3,
.minimum_version_id = 3,
.minimum_version_id_old = 3,
......
......@@ -364,7 +364,7 @@ static int passthru_exitfn(CCIDCardState *base)
}
static VMStateDescription passthru_vmstate = {
.name = PASSTHRU_DEV_NAME,
.name = "ccid-card-passthru",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
......
......@@ -1397,7 +1397,7 @@ static VMStateDescription usb_device_vmstate = {
};
static VMStateDescription ccid_vmstate = {
.name = CCID_DEV_NAME,
.name = "usb-ccid",
.version_id = 1,
.minimum_version_id = 1,
.post_load = ccid_post_load,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册