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

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

Comments

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

Patch

diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h
index 2e1a428..8469956 100644
--- a/hw/virtio-serial.h
+++ b/hw/virtio-serial.h
@@ -45,10 +45,10 @@  struct virtio_console_control {
     uint16_t value;		/* Extra information for the key */
 };
 
-struct virtio_serial_conf {
+typedef struct virtio_serial_conf {
     /* Max. number of ports we can have for a virtio-serial device */
     uint32_t max_virtserial_ports;
-};
+} virtio_serial_conf;
 
 /* Some events for the internal messages (control packets) */
 #define VIRTIO_CONSOLE_DEVICE_READY	0
@@ -166,6 +166,9 @@  struct VirtIOSerialPortInfo {
                          size_t len);
 };
 
+VirtIODevice *virtio_serial_init(DeviceState *dev, virtio_serial_conf *serial);
+void virtio_serial_exit(VirtIODevice *vdev);
+
 /* Interface to the virtio-serial bus */
 
 /*
diff --git a/hw/virtio.h b/hw/virtio.h
index b4ef022..3cf2e25 100644
--- a/hw/virtio.h
+++ b/hw/virtio.h
@@ -193,8 +193,6 @@  void virtio_bind_device(VirtIODevice *vdev, const VirtIOBindings *binding,
 /* Base devices.  */
 typedef struct VirtIOBlkConf VirtIOBlkConf;
 VirtIODevice *virtio_blk_init(DeviceState *dev, VirtIOBlkConf *blk);
-typedef struct virtio_serial_conf virtio_serial_conf;
-VirtIODevice *virtio_serial_init(DeviceState *dev, virtio_serial_conf *serial);
 VirtIODevice *virtio_balloon_init(DeviceState *dev);
 #ifdef CONFIG_VIRTFS
 VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf);
@@ -202,7 +200,6 @@  VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf);
 
 
 void virtio_blk_exit(VirtIODevice *vdev);
-void virtio_serial_exit(VirtIODevice *vdev);
 void virtio_balloon_exit(VirtIODevice *vdev);
 
 #define DEFINE_VIRTIO_COMMON_FEATURES(_state, _field) \