summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-09-30 15:03:27 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-09-30 15:03:27 +0100
commit7be3c1408ab7ac0ded770729ec1c4565feead5ab (patch)
treef4b3208a6899bc65f64efa441b00b3e8f594e612 /hw
parent2e456b2b606aef488de27f8212e22382141fa022 (diff)
parent133771477c39f3716d9a85609aca0d3e5a77c55c (diff)
downloadhqemu-7be3c1408ab7ac0ded770729ec1c4565feead5ab.zip
hqemu-7be3c1408ab7ac0ded770729ec1c4565feead5ab.tar.gz
Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20140930-1' into staging
ac97: register reset via qom # gpg: Signature made Tue 30 Sep 2014 12:32:29 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-audio-20140930-1: ac97: register reset via qom Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/audio/ac97.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c
index 0e22bb9..111ec0e 100644
--- a/hw/audio/ac97.c
+++ b/hw/audio/ac97.c
@@ -1321,9 +1321,9 @@ static const MemoryRegionOps ac97_io_nabm_ops = {
.endianness = DEVICE_LITTLE_ENDIAN,
};
-static void ac97_on_reset (void *opaque)
+static void ac97_on_reset (DeviceState *dev)
{
- AC97LinkState *s = opaque;
+ AC97LinkState *s = container_of(dev, AC97LinkState, dev.qdev);
reset_bm_regs (s, &s->bm_regs[0]);
reset_bm_regs (s, &s->bm_regs[1]);
@@ -1382,9 +1382,8 @@ static int ac97_initfn (PCIDevice *dev)
"ac97-nabm", 256);
pci_register_bar (&s->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &s->io_nam);
pci_register_bar (&s->dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->io_nabm);
- qemu_register_reset (ac97_on_reset, s);
AUD_register_card ("ac97", &s->card);
- ac97_on_reset (s);
+ ac97_on_reset (&s->dev.qdev);
return 0;
}
@@ -1413,6 +1412,7 @@ static void ac97_class_init (ObjectClass *klass, void *data)
dc->desc = "Intel 82801AA AC97 Audio";
dc->vmsd = &vmstate_ac97;
dc->props = ac97_properties;
+ dc->reset = ac97_on_reset;
}
static const TypeInfo ac97_info = {
OpenPOWER on IntegriCloud