From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 2/8] hw/sd/pxa2xx: Do not open-code sysbus_create_simple()
Date: Wed, 18 Oct 2023 15:12:14 +0200 [thread overview]
Message-ID: <20231018131220.84380-3-philmd@linaro.org> (raw)
In-Reply-To: <20231018131220.84380-1-philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/sd/pxa2xx_mmci.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
index 9f7a880bac..4749e935d8 100644
--- a/hw/sd/pxa2xx_mmci.c
+++ b/hw/sd/pxa2xx_mmci.c
@@ -479,13 +479,8 @@ PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem,
qemu_irq irq, qemu_irq rx_dma, qemu_irq tx_dma)
{
DeviceState *dev;
- SysBusDevice *sbd;
- dev = qdev_new(TYPE_PXA2XX_MMCI);
- sbd = SYS_BUS_DEVICE(dev);
- sysbus_realize_and_unref(sbd, &error_fatal);
- sysbus_mmio_map(sbd, 0, base);
- sysbus_connect_irq(sbd, 0, irq);
+ dev = sysbus_create_simple(TYPE_PXA2XX_MMCI, base, irq);
qdev_connect_gpio_out_named(dev, "rx-dma", 0, rx_dma);
qdev_connect_gpio_out_named(dev, "tx-dma", 0, tx_dma);
--
2.41.0
next prev parent reply other threads:[~2023-10-18 13:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 13:12 [PATCH 0/8] hw/arm/pxa2xx: SysBus/QDev fixes Philippe Mathieu-Daudé
2023-10-18 13:12 ` [PATCH 1/8] hw/sd/pxa2xx: Realize sysbus device before accessing it Philippe Mathieu-Daudé
2023-10-18 13:12 ` Philippe Mathieu-Daudé [this message]
2023-10-18 13:12 ` [PATCH 3/8] hw/pcmcia/pxa2xx: " Philippe Mathieu-Daudé
2023-10-18 13:12 ` [PATCH 4/8] hw/pcmcia/pxa2xx: Do not open-code sysbus_create_simple() Philippe Mathieu-Daudé
2023-10-18 13:12 ` [PATCH 5/8] hw/pcmcia/pxa2xx: Inline pxa2xx_pcmcia_init() Philippe Mathieu-Daudé
2023-10-18 13:12 ` [PATCH 6/8] hw/intc/pxa2xx: Convert to Resettable interface Philippe Mathieu-Daudé
2023-10-18 13:12 ` [PATCH 7/8] hw/intc/pxa2xx: Pass CPU reference using QOM link property Philippe Mathieu-Daudé
2023-10-18 13:12 ` [PATCH 8/8] hw/intc/pxa2xx: Factor pxa2xx_pic_realize() out of pxa2xx_pic_init() Philippe Mathieu-Daudé
2023-10-18 13:13 ` [PATCH 0/8] hw/arm/pxa2xx: SysBus/QDev fixes Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231018131220.84380-3-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).