aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-09-19 14:48:38 +0800
committerGerd Hoffmann <kraxel@redhat.com>2014-09-23 12:51:07 +0200
commit5450eeaaad8e27a6cd2b5c4bd55404e50ed1426b (patch)
tree0ac4431b9ce8267086909e08540bd2a615fb9a79 /hw/usb
parent27107d416e7c0b37252f5475641f0ca51036915c (diff)
downloadqemu-5450eeaaad8e27a6cd2b5c4bd55404e50ed1426b.zip
qemu-5450eeaaad8e27a6cd2b5c4bd55404e50ed1426b.tar.gz
qemu-5450eeaaad8e27a6cd2b5c4bd55404e50ed1426b.tar.bz2
usb-audio: convert init to realize
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/dev-audio.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c
index 7b9957b..67deffe 100644
--- a/hw/usb/dev-audio.c
+++ b/hw/usb/dev-audio.c
@@ -628,7 +628,7 @@ static void usb_audio_handle_destroy(USBDevice *dev)
streambuf_fini(&s->out.buf);
}
-static int usb_audio_initfn(USBDevice *dev)
+static void usb_audio_realize(USBDevice *dev, Error **errp)
{
USBAudioState *s = DO_UPCAST(USBAudioState, dev, dev);
@@ -651,7 +651,6 @@ static int usb_audio_initfn(USBDevice *dev)
s, output_callback, &s->out.as);
AUD_set_volume_out(s->out.voice, s->out.mute, s->out.vol[0], s->out.vol[1]);
AUD_set_active_out(s->out.voice, 0);
- return 0;
}
static const VMStateDescription vmstate_usb_audio = {
@@ -676,7 +675,7 @@ static void usb_audio_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
k->product_desc = "QEMU USB Audio Interface";
k->usb_desc = &desc_audio;
- k->init = usb_audio_initfn;
+ k->realize = usb_audio_realize;
k->handle_reset = usb_audio_handle_reset;
k->handle_control = usb_audio_handle_control;
k->handle_data = usb_audio_handle_data;