From cd53991de40a90399a8b56f0ad7b9320442ea5bb Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Mon, 23 Oct 2023 09:37:35 +0100 Subject: hw/net/smc91c111: use qemu_configure_nic_device() Some callers instantiate the device unconditionally, others will do so only if there is a NICInfo to go with it. This appears to be fairly random, but preserve the existing behaviour of each caller for now. Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/net/smc91c111.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hw/net') diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c index 49b7c26..702d0e8 100644 --- a/hw/net/smc91c111.c +++ b/hw/net/smc91c111.c @@ -818,14 +818,13 @@ static void smc91c111_register_types(void) /* Legacy helper function. Should go away when machine config files are implemented. */ -void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq) +void smc91c111_init(uint32_t base, qemu_irq irq) { DeviceState *dev; SysBusDevice *s; - qemu_check_nic_model(nd, "smc91c111"); dev = qdev_new(TYPE_SMC91C111); - qdev_set_nic_properties(dev, nd); + qemu_configure_nic_device(dev, true, NULL); s = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(s, &error_fatal); sysbus_mmio_map(s, 0, base); -- cgit v1.1