Skip to content

Commit 526dc84

Browse files
philmdvivier
authored andcommitted
qdev: Complete qdev_init_gpio_out() documentation
qdev_init_gpio_out() states it "creates an array of anonymous output GPIO lines" but doesn't document how this array is released. Add a note that it is automatically free'd in qdev instance_finalize(). Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Message-Id: <[email protected]> Signed-off-by: Laurent Vivier <[email protected]>
1 parent 4be8bfc commit 526dc84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/hw/qdev-core.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,10 @@ void qdev_init_gpio_in(DeviceState *dev, qemu_irq_handler handler, int n);
598598
*
599599
* See qdev_connect_gpio_out() for how code that uses such a device
600600
* can connect to one of its output GPIO lines.
601+
*
602+
* There is no need to release the @pins allocated array because it
603+
* will be automatically released when @dev calls its instance_finalize()
604+
* handler.
601605
*/
602606
void qdev_init_gpio_out(DeviceState *dev, qemu_irq *pins, int n);
603607
/**

0 commit comments

Comments
 (0)