summaryrefslogtreecommitdiff
path: root/hw/ac97.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-12 12:33:04 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-12 12:33:04 +0100
commit22d83b140e7b2dda555b7e3035050454f8764b7f (patch)
treeb80cd7f2cbae7951323871218db3772dd8b3b8c7 /hw/ac97.c
parent0d9acba8fddbf970c7353083e6a60b47017ce3e4 (diff)
downloadqemu-22d83b140e7b2dda555b7e3035050454f8764b7f.tar.gz
qemu-22d83b140e7b2dda555b7e3035050454f8764b7f.tar.bz2
qemu-22d83b140e7b2dda555b7e3035050454f8764b7f.zip
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>
Diffstat (limited to 'hw/ac97.c')
-rw-r--r--hw/ac97.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/ac97.c b/hw/ac97.c
index d9ef141744..f2ae4b3b19 100644
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -1308,8 +1308,9 @@ static void ac97_on_reset (void *opaque)
mixer_reset (s);
}
-int ac97_init (PCIBus *bus, AudioState *audio)
+int ac97_init (PCIBus *bus)
{
+ AudioState *audio = AUD_init();
PCIAC97LinkState *d;
AC97LinkState *s;
uint8_t *c;
@@ -1319,11 +1320,6 @@ int ac97_init (PCIBus *bus, AudioState *audio)
return -1;
}
- if (!audio) {
- AUD_log ("ac97", "No audio state\n");
- return -1;
- }
-
d = (PCIAC97LinkState *) pci_register_device (bus, "AC97",
sizeof (PCIAC97LinkState),
-1, NULL, NULL);