mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
hw/net/lan9118: 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 preseve the existing behaviour for now. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
cd53991de4
commit
f138ed5e00
6 changed files with 10 additions and 13 deletions
|
@ -1408,14 +1408,13 @@ static void lan9118_register_types(void)
|
|||
|
||||
/* Legacy helper function. Should go away when machine config files are
|
||||
implemented. */
|
||||
void lan9118_init(NICInfo *nd, uint32_t base, qemu_irq irq)
|
||||
void lan9118_init(uint32_t base, qemu_irq irq)
|
||||
{
|
||||
DeviceState *dev;
|
||||
SysBusDevice *s;
|
||||
|
||||
qemu_check_nic_model(nd, "lan9118");
|
||||
dev = qdev_new(TYPE_LAN9118);
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue