Push AUD_init down to devices
Now we can safely call AUD_init multiple times we can push it down to
individual audio devices, rather than having to pass it from the board
init.
Signed-off-by: Paul Brook <paul@codesourcery.com>
diff --git a/hw/cs4231a.c b/hw/cs4231a.c
index 25ad409..4212ed1 100644
--- a/hw/cs4231a.c
+++ b/hw/cs4231a.c
@@ -636,16 +636,12 @@
return 0;
}
-int cs4231a_init (AudioState *audio, qemu_irq *pic)
+int cs4231a_init (qemu_irq *pic)
{
+ AudioState *audio = AUD_init();
int i;
CSState *s;
- if (!audio) {
- lerr ("No audio state\n");
- return -1;
- }
-
s = qemu_mallocz (sizeof (*s));
s->pic = pic;