diff mbox series

[PULL,23/41] hw/pcmcia/pxa2xx: Do not open-code sysbus_create_simple()

Message ID 20231027143942.3413881-24-peter.maydell@linaro.org
State Accepted
Commit 77d3fa5c3080c930af34f906263b0d883351eea9
Headers show
Series [PULL,01/41] target/arm: Correct minor errors in Cortex-A710 definition | expand

Commit Message

Peter Maydell Oct. 27, 2023, 2:39 p.m. UTC
From: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20231020130331.50048-5-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/pcmcia/pxa2xx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/hw/pcmcia/pxa2xx.c b/hw/pcmcia/pxa2xx.c
index e7264feb455..3d512a292c7 100644
--- a/hw/pcmcia/pxa2xx.c
+++ b/hw/pcmcia/pxa2xx.c
@@ -143,9 +143,7 @@  PXA2xxPCMCIAState *pxa2xx_pcmcia_init(MemoryRegion *sysmem,
 {
     DeviceState *dev;
 
-    dev = qdev_new(TYPE_PXA2XX_PCMCIA);
-    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
-    sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
+    dev = sysbus_create_simple(TYPE_PXA2XX_PCMCIA, base, NULL);
 
     return PXA2XX_PCMCIA(dev);
 }