aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/qdev.c2
-rw-r--r--hw/qdev.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index d0052d436c..b634890068 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -387,7 +387,7 @@ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd)
qdev_prop_set_vlan(dev, "vlan", nd->vlan);
if (nd->netdev)
qdev_prop_set_netdev(dev, "netdev", nd->netdev);
- if (nd->nvectors != NIC_NVECTORS_UNSPECIFIED &&
+ if (nd->nvectors != DEV_NVECTORS_UNSPECIFIED &&
qdev_prop_exists(dev, "vectors")) {
qdev_prop_set_uint32(dev, "vectors", nd->nvectors);
}
diff --git a/hw/qdev.h b/hw/qdev.h
index 0eb45b0476..adfcf795c3 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -24,6 +24,10 @@ enum DevState {
DEV_STATE_INITIALIZED,
};
+enum {
+ DEV_NVECTORS_UNSPECIFIED = -1,
+};
+
/* This structure should not be accessed directly. We declare it here
so that it can be embedded in individual device state structures. */
struct DeviceState {