aboutsummaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2017-10-17 13:44:23 -0300
committerMichael Tokarev <mjt@tls.msk.ru>2017-12-18 17:07:02 +0300
commit0d5d8a3a906f782eab8a85079eede78879dc8155 (patch)
treee8064d626b3cee4e1b3e2b64a7db4c700b33e115 /hw/misc
parent489983d6b4cb501a86dfd08648fb370aec0f9b51 (diff)
downloadqemu-0d5d8a3a906f782eab8a85079eede78879dc8155.zip
qemu-0d5d8a3a906f782eab8a85079eede78879dc8155.tar.gz
qemu-0d5d8a3a906f782eab8a85079eede78879dc8155.tar.bz2
hw/misc/pvpanic: extract public API from i386/pc to "hw/misc/pvpanic.h"
and remove the old i386/pc dependency. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/pvpanic.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index 3a0e4ba..b26250d 100644
--- a/hw/misc/pvpanic.c
+++ b/hw/misc/pvpanic.c
@@ -17,7 +17,7 @@
#include "qemu/log.h"
#include "hw/nvram/fw_cfg.h"
-#include "hw/i386/pc.h"
+#include "hw/misc/pvpanic.h"
/* The bit of supported pv event */
#define PVPANIC_F_PANICKED 0
@@ -25,9 +25,8 @@
/* The pv event value */
#define PVPANIC_PANICKED (1 << PVPANIC_F_PANICKED)
-#define TYPE_ISA_PVPANIC_DEVICE "pvpanic"
#define ISA_PVPANIC_DEVICE(obj) \
- OBJECT_CHECK(PVPanicState, (obj), TYPE_ISA_PVPANIC_DEVICE)
+ OBJECT_CHECK(PVPanicState, (obj), TYPE_PVPANIC)
static void handle_event(int event)
{
@@ -104,7 +103,7 @@ static void pvpanic_isa_realizefn(DeviceState *dev, Error **errp)
uint16_t pvpanic_port(void)
{
- Object *o = object_resolve_path_type("", TYPE_ISA_PVPANIC_DEVICE, NULL);
+ Object *o = object_resolve_path_type("", TYPE_PVPANIC, NULL);
if (!o) {
return 0;
}
@@ -126,7 +125,7 @@ static void pvpanic_isa_class_init(ObjectClass *klass, void *data)
}
static TypeInfo pvpanic_isa_info = {
- .name = TYPE_ISA_PVPANIC_DEVICE,
+ .name = TYPE_PVPANIC,
.parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(PVPanicState),
.instance_init = pvpanic_isa_initfn,