Message ID | 0358823c4700d4802235bc5790d78967053bc164.1345637459.git.julien.grall@citrix.com |
---|---|
State | New |
Headers | show |
On Wed, 22 Aug 2012, Julien Grall wrote: > Signed-off-by: Julien Grall <julien.grall@citrix.com> > --- > arch_init.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/arch_init.c b/arch_init.c > index 9b46bfc..1077b16 100644 > --- a/arch_init.c > +++ b/arch_init.c > @@ -44,6 +44,7 @@ > #include "exec-memory.h" > #include "hw/pcspk.h" > #include "qemu/page_cache.h" > +#include "hw/xen.h" > > #ifdef DEBUG_ARCH_INIT > #define DPRINTF(fmt, ...) \ > @@ -976,6 +977,9 @@ void select_soundhw(const char *optarg) > void audio_init(ISABus *isa_bus, PCIBus *pci_bus) > { > struct soundhw *c; > + int register_default_dev; > + > + xen_set_register_default_dev(0, ®ister_default_dev); > > for (c = soundhw; c->name; ++c) { > if (c->enabled) { > @@ -990,6 +994,8 @@ void audio_init(ISABus *isa_bus, PCIBus *pci_bus) > } > } > } > + > + xen_set_register_default_dev(register_default_dev, NULL); > } > #else > void select_soundhw(const char *optarg) and this is why it is better to have a list rather than a stateful register_default_dev integer. This stuff is really easy to break.
diff --git a/arch_init.c b/arch_init.c index 9b46bfc..1077b16 100644 --- a/arch_init.c +++ b/arch_init.c @@ -44,6 +44,7 @@ #include "exec-memory.h" #include "hw/pcspk.h" #include "qemu/page_cache.h" +#include "hw/xen.h" #ifdef DEBUG_ARCH_INIT #define DPRINTF(fmt, ...) \ @@ -976,6 +977,9 @@ void select_soundhw(const char *optarg) void audio_init(ISABus *isa_bus, PCIBus *pci_bus) { struct soundhw *c; + int register_default_dev; + + xen_set_register_default_dev(0, ®ister_default_dev); for (c = soundhw; c->name; ++c) { if (c->enabled) { @@ -990,6 +994,8 @@ void audio_init(ISABus *isa_bus, PCIBus *pci_bus) } } } + + xen_set_register_default_dev(register_default_dev, NULL); } #else void select_soundhw(const char *optarg)
Signed-off-by: Julien Grall <julien.grall@citrix.com> --- arch_init.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)