[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/11] hw/misc/vmcoreinfo: Convert reset handler to DeviceReset
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 11/11] hw/misc/vmcoreinfo: Convert reset handler to DeviceReset |
Date: |
Thu, 26 Sep 2019 17:17:33 +0200 |
Convert the reset handler into a proper Device reset method.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/misc/vmcoreinfo.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c
index 326a3ce8f4..a1c4847cdf 100644
--- a/hw/misc/vmcoreinfo.c
+++ b/hw/misc/vmcoreinfo.c
@@ -13,7 +13,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/module.h"
-#include "sysemu/reset.h"
#include "hw/nvram/fw_cfg.h"
#include "migration/vmstate.h"
#include "hw/misc/vmcoreinfo.h"
@@ -26,7 +25,7 @@ static void fw_cfg_vmci_write(void *dev, off_t offset, size_t
len)
&& s->vmcoreinfo.guest_format != FW_CFG_VMCOREINFO_FORMAT_NONE;
}
-static void vmcoreinfo_reset(void *dev)
+static void vmcoreinfo_reset(DeviceState *dev)
{
VMCoreInfoState *s = VMCOREINFO(dev);
@@ -61,7 +60,6 @@ static void vmcoreinfo_realize(DeviceState *dev, Error **errp)
NULL, fw_cfg_vmci_write, s,
&s->vmcoreinfo, sizeof(s->vmcoreinfo), false);
- qemu_register_reset(vmcoreinfo_reset, dev);
vmcoreinfo_state = s;
}
@@ -84,6 +82,7 @@ static void vmcoreinfo_device_class_init(ObjectClass *klass,
void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &vmstate_vmcoreinfo;
+ dc->reset = vmcoreinfo_reset;
dc->realize = vmcoreinfo_realize;
dc->hotpluggable = false;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
--
2.20.1
- [PATCH 00/11] hw: Convert various reset() handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 01/11] hw/acpi/piix4: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 02/11] hw/ide/piix: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 03/11] hw/isa/piix4: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 04/11] hw/pci-host/piix: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 05/11] hw/ide/sii3112: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 07/11] hw/isa/vt82c686: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 06/11] hw/ide/via82c: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 09/11] hw/pci-host/bonito: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 08/11] hw/input/lm832x: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 11/11] hw/misc/vmcoreinfo: Convert reset handler to DeviceReset,
Philippe Mathieu-Daudé <=
- [PATCH 10/11] hw/timer/etraxfs: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- Re: [PATCH 00/11] hw: Convert various reset() handler to DeviceReset, no-reply, 2019/09/27