From 22d83b140e7b2dda555b7e3035050454f8764b7f Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Tue, 12 May 2009 12:33:04 +0100 Subject: 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 --- hw/es1370.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'hw/es1370.c') diff --git a/hw/es1370.c b/hw/es1370.c index 50f5a552ed..99ee208a49 100644 --- a/hw/es1370.c +++ b/hw/es1370.c @@ -1005,8 +1005,9 @@ static void es1370_on_reset (void *opaque) es1370_reset (s); } -int es1370_init (PCIBus *bus, AudioState *audio) +int es1370_init (PCIBus *bus) { + AudioState *audio = AUD_init(); PCIES1370State *d; ES1370State *s; uint8_t *c; @@ -1016,11 +1017,6 @@ int es1370_init (PCIBus *bus, AudioState *audio) return -1; } - if (!audio) { - dolog ("No audio state\n"); - return -1; - } - d = (PCIES1370State *) pci_register_device (bus, "ES1370", sizeof (PCIES1370State), -1, NULL, NULL); -- cgit v1.2.3