]> Git Repo - qemu.git/blobdiff - hw/input/virtio-input.c
virtio: Clean up includes
[qemu.git] / hw / input / virtio-input.c
index 7f5b8d6000e02ecf72e6cff1188f810f467ebd63..f12ed8a50476f7ddfef6ba63bebf2dbfae1245cc 100644 (file)
@@ -4,6 +4,7 @@
  * top-level directory.
  */
 
+#include "qemu/osdep.h"
 #include "qemu/iov.h"
 
 #include "hw/qdev.h"
@@ -20,6 +21,10 @@ void virtio_input_send(VirtIOInput *vinput, virtio_input_event *event)
     unsigned have, need;
     int i, len;
 
+    if (!vinput->active) {
+        return;
+    }
+
     /* queue up events ... */
     if (vinput->qindex == vinput->qsize) {
         vinput->qsize++;
@@ -166,7 +171,8 @@ static void virtio_input_set_config(VirtIODevice *vdev,
     virtio_notify_config(vdev);
 }
 
-static uint64_t virtio_input_get_features(VirtIODevice *vdev, uint64_t f)
+static uint64_t virtio_input_get_features(VirtIODevice *vdev, uint64_t f,
+                                          Error **errp)
 {
     return f;
 }
This page took 0.024439 seconds and 4 git commands to generate.