diff options
author | Paul Brook <paul@codesourcery.com> | 2009-05-12 12:33:04 +0100 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-05-12 12:33:04 +0100 |
commit | 22d83b140e7b2dda555b7e3035050454f8764b7f (patch) | |
tree | b80cd7f2cbae7951323871218db3772dd8b3b8c7 /hw/es1370.c | |
parent | 0d9acba8fddbf970c7353083e6a60b47017ce3e4 (diff) |
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/es1370.c')
-rw-r--r-- | hw/es1370.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/es1370.c b/hw/es1370.c index 50f5a552e..99ee208a4 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); |