Skip to content

Commit

Permalink
qdev: Complete qdev_init_gpio_out() documentation
Browse files Browse the repository at this point in the history
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é <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210819142731.2827912-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
  • Loading branch information
philmd authored and vivier committed Sep 15, 2021
1 parent 4be8bfc commit 526dc84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/hw/qdev-core.h
Expand Up @@ -598,6 +598,10 @@ void qdev_init_gpio_in(DeviceState *dev, qemu_irq_handler handler, int n);
*
* See qdev_connect_gpio_out() for how code that uses such a device
* can connect to one of its output GPIO lines.
*
* There is no need to release the @pins allocated array because it
* will be automatically released when @dev calls its instance_finalize()
* handler.
*/
void qdev_init_gpio_out(DeviceState *dev, qemu_irq *pins, int n);
/**
Expand Down

0 comments on commit 526dc84

Please sign in to comment.