diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2013-06-22 08:06:54 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-04 17:42:43 +0200 |
commit | a8aec29569e8baa4d86ea2aac16f8c4d78ab2a2a (patch) | |
tree | 78877fcf54b0ea7f936a9600670a3e903d513113 | |
parent | f487b677c2dc15786dbe7c61326cc49e7c64daea (diff) | |
download | qemu-a8aec29569e8baa4d86ea2aac16f8c4d78ab2a2a.zip qemu-a8aec29569e8baa4d86ea2aac16f8c4d78ab2a2a.tar.gz qemu-a8aec29569e8baa4d86ea2aac16f8c4d78ab2a2a.tar.bz2 |
adlib: replace register_ioport*
Convert over to memory regions to obsolete register_ioport*.
CC: malc <av1474@comtv.ru>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | hw/audio/adlib.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c index 6a7d377..8b9b81e 100644 --- a/hw/audio/adlib.c +++ b/hw/audio/adlib.c @@ -283,9 +283,17 @@ static void Adlib_fini (AdlibState *s) AUD_remove_card (&s->card); } +static MemoryRegionPortio adlib_portio_list[] = { + { 0x388, 4, 1, .read = adlib_read, .write = adlib_write, }, + { 0, 4, 1, .read = adlib_read, .write = adlib_write, }, + { 0, 2, 1, .read = adlib_read, .write = adlib_write, }, + PORTIO_END_OF_LIST(), +}; + static void adlib_realizefn (DeviceState *dev, Error **errp) { AdlibState *s = ADLIB(dev); + PortioList *port_list = g_new(PortioList, 1); struct audsettings as; if (glob_adlib) { @@ -339,14 +347,10 @@ static void adlib_realizefn (DeviceState *dev, Error **errp) s->samples = AUD_get_buffer_size_out (s->voice) >> SHIFT; s->mixbuf = g_malloc0 (s->samples << SHIFT); - register_ioport_read (0x388, 4, 1, adlib_read, s); - register_ioport_write (0x388, 4, 1, adlib_write, s); - - register_ioport_read (s->port, 4, 1, adlib_read, s); - register_ioport_write (s->port, 4, 1, adlib_write, s); - - register_ioport_read (s->port + 8, 2, 1, adlib_read, s); - register_ioport_write (s->port + 8, 2, 1, adlib_write, s); + adlib_portio_list[1].offset = s->port; + adlib_portio_list[2].offset = s->port + 8; + portio_list_init (port_list, adlib_portio_list, s, "adlib"); + portio_list_add (port_list, isa_address_space_io(&s->parent_obj), 0); } static Property adlib_properties[] = { |