ac97: register reset via qom
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJUKpTNAAoJEEy22O7T6HE4Fk0QAIDAgHBFchC8IboueqmPMcEc j+IjcOP5B2zE+B84whCsPGMIpaFGPG0NB6rlsNH+r5Zt+Fubi5JOZ18zuZixmuDd mdI9xGgDOMAxcXAokwIEe//AgivcztCZauUALKJptKjOT/jL99cyoAJKap7aqwJM Kya59J9vRzm8Sul9/9UlW17CB8af2z5fkxhieD27rvzMP5skAm9XZMeY2iCip0u9 x9x3a+6DAHah++iCzZsthliz4r8FQS3MdWAcHsYreUi84OMUoN9qKGdOAIuWJwQr 5rHxA9GEqCekSDUSnJ5fy/AumO0ugcWaoox5v5TOjiAvE4fOutoybLf8gGm1oX+f 5XVJUYasY86TZJ72aw0upz9tQpLInUdTd+7SeRV1ddNF3tnsCns6CeF783pcMytR T/8i3rfUSBU2g0jm0Fqsye2aysTG6E0eJ63lgqXforigIrIu3Az3MuAE002tp4op KWGE1wYDYfq9pvln+ERKySAzKJ/ABPrhRzqGee/T3qW028KisokegNeoRAqhSqrf 08ay8buKHaC8/OIDn1+cjA0yqjqxSRZCD0q7COBGVlYm0FJdcTy+mw8b7fORK2sV X2mIsKDFThNbbRDzqPNMwwwOVIgN1T+DzmR6nj2FtGz/mQVNQeIeMItmGWk8UvZS foUktFEhxFUepdkBf6TK =Kxdt -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
7be3c1408a
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue