]> git.proxmox.com Git - mirror_qemu.git/commit
qdev: relax bus type check in qdev_device_add() (v2)
authorAnthony Liguori <aliguori@us.ibm.com>
Thu, 29 Nov 2012 13:46:23 +0000 (07:46 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 29 Nov 2012 15:11:03 +0000 (09:11 -0600)
commite912c96f7d2e5ccd8a6352ee74f5beee2a7d9976
tree32bccac0a6fe9d817d8890bf73eeb700da9956b8
parente9bff10f8db94912b1b0e6e2e3394cae02faf614
qdev: relax bus type check in qdev_device_add() (v2)

We are currently checking for an exact type match.  Use QOM dynamic_cast to
check for a compatible type instead.

Cc: Konrad Frederic <fred.konrad@greensocs.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
v1 -> v2:
 - also add cast to qbus_find_recursive (Peter)
 - simplify by doing object_dynamic_cast instead of messing with classes
hw/qdev-monitor.c