diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-03-28 18:01:36 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-18 15:14:37 +0200 |
commit | 3cb75a7cba7e808c0ae007e4d86750849642304e (patch) | |
tree | a4e645a38566e0540d9654fa33e61ac1106968a8 /hw/virtio-serial-bus.c | |
parent | 2f262e06f01a38cb8a218b7c5ad71233883a6b55 (diff) | |
download | hqemu-3cb75a7cba7e808c0ae007e4d86750849642304e.zip hqemu-3cb75a7cba7e808c0ae007e4d86750849642304e.tar.gz |
qdev: Move bus properties to a separate global
Simple code movement in order to simplify future refactoring.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/virtio-serial-bus.c')
-rw-r--r-- | hw/virtio-serial-bus.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 72287d1..ccdbdb3 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -728,15 +728,17 @@ static int virtio_serial_load(QEMUFile *f, void *opaque, int version_id) static void virtser_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent); +static Property virtser_props[] = { + DEFINE_PROP_UINT32("nr", VirtIOSerialPort, id, VIRTIO_CONSOLE_BAD_ID), + DEFINE_PROP_STRING("name", VirtIOSerialPort, name), + DEFINE_PROP_END_OF_LIST() +}; + static struct BusInfo virtser_bus_info = { .name = "virtio-serial-bus", .size = sizeof(VirtIOSerialBus), .print_dev = virtser_bus_dev_print, - .props = (Property[]) { - DEFINE_PROP_UINT32("nr", VirtIOSerialPort, id, VIRTIO_CONSOLE_BAD_ID), - DEFINE_PROP_STRING("name", VirtIOSerialPort, name), - DEFINE_PROP_END_OF_LIST() - } + .props = virtser_props, }; static void virtser_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent) |