qdev: gpio: Re-implement qdev_connect_gpio QOM style
commit02757df2ad2d5dfc96482e2cdfa046f439dafc3d
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Fri, 26 Sep 2014 05:20:25 +0000 (25 22:20 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Oct 2014 14:41:25 +0000 (23 16:41 +0200)
treee1d3fe8b901f3a5caab1ebdafeddf612383a01ce
parent8faa2f8571e399ba486bad00e25b6c9b22b6fd9a
qdev: gpio: Re-implement qdev_connect_gpio QOM style

Re-implement as a link setter. This should allow the QOM framework to
keep track of ref counts properly etc.

We need to add a default parent for the connecting input incase it's
coming from a non-qdev source. We simply parent the IRQ to the machine
in this case.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/core/qdev.c