diff mbox

[06/10] virtio-rng: switch to linux-headers

Message ID 1369319649-23900-7-git-send-email-mst@redhat.com
State New
Headers show

Commit Message

Michael S. Tsirkin May 23, 2013, 2:35 p.m. UTC
It's easier to keep everything in sync if
we just use linux headers for virtio constants.
Add virtio_rng.h header from linux 3.10-rc1, and
remove duplicate symbols from virtio-rng.h

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/hw/virtio/virtio-rng.h   | 5 ++---
 linux-headers/linux/virtio_rng.h | 8 ++++++++
 2 files changed, 10 insertions(+), 3 deletions(-)
 create mode 100644 linux-headers/linux/virtio_rng.h
diff mbox

Patch

diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/virtio-rng.h
index debaa15..a0cc62e 100644
--- a/include/hw/virtio/virtio-rng.h
+++ b/include/hw/virtio/virtio-rng.h
@@ -14,14 +14,13 @@ 
 
 #include "sysemu/rng.h"
 #include "sysemu/rng-random.h"
+#include "linux/virtio_rng.h"
+#include "linux/virtio_ids.h"
 
 #define TYPE_VIRTIO_RNG "virtio-rng-device"
 #define VIRTIO_RNG(obj) \
         OBJECT_CHECK(VirtIORNG, (obj), TYPE_VIRTIO_RNG)
 
-/* The Virtio ID for the virtio rng device */
-#define VIRTIO_ID_RNG    4
-
 struct VirtIORNGConf {
     RngBackend *rng;
     uint64_t max_bytes;
diff --git a/linux-headers/linux/virtio_rng.h b/linux-headers/linux/virtio_rng.h
new file mode 100644
index 0000000..c4d5de8
--- /dev/null
+++ b/linux-headers/linux/virtio_rng.h
@@ -0,0 +1,8 @@ 
+#ifndef _LINUX_VIRTIO_RNG_H
+#define _LINUX_VIRTIO_RNG_H
+/* This header is BSD licensed so anyone can use the definitions to implement
+ * compatible drivers/servers. */
+#include <linux/virtio_ids.h>
+#include <linux/virtio_config.h>
+
+#endif /* _LINUX_VIRTIO_RNG_H */