Patchwork [v2,15/15] virtio-blk: move init function to virtio-blk.h

login
register
mail settings
Submitter Paolo Bonzini
Date Jan. 2, 2012, 5:59 p.m.
Message ID <1325527166-23898-16-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/133902/
State New
Headers show

Comments

Paolo Bonzini - Jan. 2, 2012, 5:59 p.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/virtio-blk.h |    7 +++++--
 hw/virtio.h     |    7 -------
 2 files changed, 5 insertions(+), 9 deletions(-)

Patch

diff --git a/hw/virtio-blk.h b/hw/virtio-blk.h
index 518e1cc..70d939a 100644
--- a/hw/virtio-blk.h
+++ b/hw/virtio-blk.h
@@ -97,11 +97,14 @@  struct virtio_scsi_inhdr
     uint32_t residual;
 };
 
-struct VirtIOBlkConf
+typedef struct VirtIOBlkConf
 {
     BlockConf conf;
     char *serial;
-};
+} VirtIOBlkConf;
+
+VirtIODevice *virtio_blk_init(DeviceState *dev, VirtIOBlkConf *blk);
+void virtio_blk_exit(VirtIODevice *vdev);
 
 #ifdef __linux__
 #define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \
diff --git a/hw/virtio.h b/hw/virtio.h
index 74576ed..552efbb 100644
--- a/hw/virtio.h
+++ b/hw/virtio.h
@@ -187,13 +187,6 @@  int virtio_set_features(VirtIODevice *vdev, uint32_t val);
 void virtio_bind_device(VirtIODevice *vdev, const VirtIOBindings *binding,
                         void *opaque);
 
-/* Base devices.  */
-typedef struct VirtIOBlkConf VirtIOBlkConf;
-VirtIODevice *virtio_blk_init(DeviceState *dev, VirtIOBlkConf *blk);
-
-
-void virtio_blk_exit(VirtIODevice *vdev);
-
 #define DEFINE_VIRTIO_COMMON_FEATURES(_state, _field) \
 	DEFINE_PROP_BIT("indirect_desc", _state, _field, \
 			VIRTIO_RING_F_INDIRECT_DESC, true), \