diff options
author | Juergen Gross <jgross@suse.com> | 2016-06-13 11:12:21 +0200 |
---|---|---|
committer | Stefano Stabellini <sstabellini@kernel.org> | 2016-06-22 11:28:42 +0100 |
commit | 25f8f6b4c295940ae5d83c19509353afc1dbc9a4 (patch) | |
tree | 4f402abf0b86f918a70e997b69b1cd6fadbb0361 /hw/xenpv | |
parent | 16246018d3097dc9ce15d07a54360dad03e9a7a6 (diff) |
xen: move xen_sysdev to xen_backend.c
Commit 9432e53a5bc88681b2d3aec4dac9db07c5476d1b added xen_sysdev as a
system device to serve as an anchor for removable virtual buses. This
introduced a build failure for non-x86 builds with CONFIG_XEN_BACKEND
set, as xen_sysdev was defined in a x86 specific file while being
consumed in an architecture independent source.
Move the xen_sysdev definition and initialization to xen_backend.c to
avoid the build failure.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'hw/xenpv')
-rw-r--r-- | hw/xenpv/xen_machine_pv.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c index f68cf48a29..48f725c9cd 100644 --- a/hw/xenpv/xen_machine_pv.c +++ b/hw/xenpv/xen_machine_pv.c @@ -25,15 +25,10 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/boards.h" -#include "hw/sysbus.h" #include "hw/xen/xen_backend.h" #include "xen_domainbuild.h" #include "sysemu/block-backend.h" -#define TYPE_XENSYSDEV "xensysdev" - -DeviceState *xen_sysdev; - static void xen_init_pv(MachineState *machine) { DriveInfo *dinfo; @@ -72,9 +67,6 @@ static void xen_init_pv(MachineState *machine) break; } - xen_sysdev = qdev_create(NULL, TYPE_XENSYSDEV); - qdev_init_nofail(xen_sysdev); - xen_be_register("console", &xen_console_ops); xen_be_register("vkbd", &xen_kbdmouse_ops); xen_be_register("vfb", &xen_framebuffer_ops); @@ -112,38 +104,6 @@ static void xen_init_pv(MachineState *machine) xen_init_display(xen_domid); } -static int xen_sysdev_init(SysBusDevice *dev) -{ - return 0; -} - -static Property xen_sysdev_properties[] = { - {/* end of property list */}, -}; - -static void xen_sysdev_class_init(ObjectClass *klass, void *data) -{ - DeviceClass *dc = DEVICE_CLASS(klass); - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); - - k->init = xen_sysdev_init; - dc->props = xen_sysdev_properties; -} - -static const TypeInfo xensysdev_info = { - .name = TYPE_XENSYSDEV, - .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(SysBusDevice), - .class_init = xen_sysdev_class_init, -}; - -static void xenpv_register_types(void) -{ - type_register_static(&xensysdev_info); -} - -type_init(xenpv_register_types); - static void xenpv_machine_init(MachineClass *mc) { mc->desc = "Xen Para-virtualized PC"; |