diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2015-06-18 17:45:47 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-06-23 10:32:35 +0200 |
commit | 6f2b9a5b24c488d38ace01910c684749ff922e26 (patch) | |
tree | 0e894aa7404967de69228d90efaa00e322c8c00d /include | |
parent | 0c8ff723bd29e5c8b2ca989f857ae5c37ec49c4e (diff) |
virtio-input: move properties, use virtio_instance_init_common
Move properties from virtio-*-pci to virtio-*-device.
Also make better use of QOM and attach common properties
to the abstract parent classes (virtio-input-device and
virtio-input-pci-device).
Switch the hid device instance init functions over to use
virtio_instance_init_common, so we get the properties of the
virtio device aliased properly to the virtio pci proxy.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/virtio-input.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/include/hw/virtio/virtio-input.h b/include/hw/virtio/virtio-input.h index 8134178bcd..8160dd65e2 100644 --- a/include/hw/virtio/virtio-input.h +++ b/include/hw/virtio/virtio-input.h @@ -50,18 +50,11 @@ typedef struct virtio_input_event virtio_input_event; #define VIRTIO_INPUT_HID_GET_PARENT_CLASS(obj) \ OBJECT_GET_PARENT_CLASS(obj, TYPE_VIRTIO_INPUT_HID) -#define DEFINE_VIRTIO_INPUT_PROPERTIES(_state, _field) \ - DEFINE_PROP_STRING("serial", _state, _field.serial) - typedef struct VirtIOInput VirtIOInput; typedef struct VirtIOInputClass VirtIOInputClass; typedef struct VirtIOInputConfig VirtIOInputConfig; typedef struct VirtIOInputHID VirtIOInputHID; -struct virtio_input_conf { - char *serial; -}; - struct VirtIOInputConfig { virtio_input_config config; QTAILQ_ENTRY(VirtIOInputConfig) node; @@ -74,7 +67,7 @@ struct VirtIOInput { uint32_t cfg_size; QTAILQ_HEAD(, VirtIOInputConfig) cfg_list; VirtQueue *evt, *sts; - virtio_input_conf input; + char *serial; virtio_input_event *queue; uint32_t qindex, qsize; |