From 526dc8405dd8cc8b1c9bc9d1ec2d950cb16bef1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 19 Aug 2021 16:27:31 +0200 Subject: [PATCH] qdev: Complete qdev_init_gpio_out() documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Reviewed-by: Peter Maydell Message-Id: <20210819142731.2827912-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- include/hw/qdev-core.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 762f9584dd..34c8a7506a 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -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); /**