summaryrefslogtreecommitdiffstats
path: root/hw/input/virtio-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/input/virtio-input.c')
-rw-r--r--hw/input/virtio-input.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c
index c4f4b3c..7f5b8d6 100644
--- a/hw/input/virtio-input.c
+++ b/hw/input/virtio-input.c
@@ -216,7 +216,7 @@ static void virtio_input_device_realize(DeviceState *dev, Error **errp)
}
virtio_input_idstr_config(vinput, VIRTIO_INPUT_CFG_ID_SERIAL,
- vinput->input.serial);
+ vinput->serial);
QTAILQ_FOREACH(cfg, &vinput->cfg_list, node) {
if (vinput->cfg_size < cfg->config.size) {
@@ -248,11 +248,17 @@ static void virtio_input_device_unrealize(DeviceState *dev, Error **errp)
virtio_cleanup(vdev);
}
+static Property virtio_input_properties[] = {
+ DEFINE_PROP_STRING("serial", VirtIOInput, serial),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void virtio_input_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
+ dc->props = virtio_input_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
vdc->realize = virtio_input_device_realize;
vdc->unrealize = virtio_input_device_unrealize;
OpenPOWER on IntegriCloud