aboutsummaryrefslogtreecommitdiff
path: root/hw/ac97.c
diff options
context:
space:
mode:
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);