Skip to content

Commit

Permalink
hw/s390x/s390-virtio-ccw: use qemu_create_nic_device()
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
dwmw2 committed Feb 1, 2024
1 parent e49dca0 commit 8826372
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions hw/s390x/s390-virtio-ccw.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,9 @@ static void s390_init_ipl_dev(const char *kernel_filename,

static void s390_create_virtio_net(BusState *bus, const char *name)
{
int i;

for (i = 0; i < nb_nics; i++) {
NICInfo *nd = &nd_table[i];
DeviceState *dev;

qemu_check_nic_model(nd, "virtio");
DeviceState *dev;

dev = qdev_new(name);
qdev_set_nic_properties(dev, nd);
while ((dev = qemu_create_nic_device(name, true, "virtio"))) {
qdev_realize_and_unref(dev, bus, &error_fatal);
}
}
Expand Down

0 comments on commit 8826372

Please sign in to comment.