]> git.proxmox.com Git - mirror_qemu.git/commit
hw/pci/pci.c: Use memory_region_init_rom()
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 7 Jul 2017 14:42:55 +0000 (15:42 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 14 Jul 2017 16:59:42 +0000 (17:59 +0100)
commitfefa92565f9a032dce974a0a6e1f296d449498f3
tree89f991aaa840b748f8eacaaa7177f36e9405238d
parentbba3ddf72e75e0a0067aff2af424a5fd27004883
hw/pci/pci.c: Use memory_region_init_rom()

Since we pass the same DeviceState object to
memory_region_init_rom_nomigrate() and vmstate_register_ram(), we can
switch to using memory_region_init_rom() instead.

(This isn't entirely obvious from the code since it is using
&pdev->qdev rather than DEVICE(pdov) for some reason, but
PCIDevice does indeed use 'qdev' for its parent DeviceState member.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1499438577-7674-10-git-send-email-peter.maydell@linaro.org
hw/pci/pci.c