qdev: gpio: Register GPIO outputs as QOM links
commit688b057aece53003f9d5a1dadc8961482dc2d948
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Fri, 26 Sep 2014 05:18:14 +0000 (25 22:18 -0700)
committerAndreas Färber <afaerber@suse.de>
Mon, 13 Oct 2014 14:39:27 +0000 (13 16:39 +0200)
treebdfe7bcd7fa3b54764acedb4bf11cf5cab388af5
parenta69bef1cf12159233b0ba193bd9dc9b173cea453
qdev: gpio: Register GPIO outputs as QOM links

Within the object that contains the GPIO output. This allows for
connecting GPIO outputs via setting of a Link property.

Also clear the link value to zero. This catch-alls the case
where a device improperly inits a gpio_out (malloc instead of
malloc0).

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
hw/core/qdev.c