aboutsummaryrefslogtreecommitdiff
path: root/hw/net/sungem.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/sungem.c')
-rw-r--r--hw/net/sungem.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/hw/net/sungem.c b/hw/net/sungem.c
index dd1b4a1..b405eb8 100644
--- a/hw/net/sungem.c
+++ b/hw/net/sungem.c
@@ -17,7 +17,7 @@
#include "net/eth.h"
#include "net/checksum.h"
#include "hw/net/mii.h"
-#include "sysemu/sysemu.h"
+#include "system/system.h"
#include "trace.h"
#include "qom/object.h"
@@ -1420,14 +1420,13 @@ static void sungem_instance_init(Object *obj)
DEVICE(obj));
}
-static Property sungem_properties[] = {
+static const Property sungem_properties[] = {
DEFINE_NIC_PROPERTIES(SunGEMState, conf),
/* Phy address should be 0 for most Apple machines except
* for K2 in which case it's 1. Will be set by a machine
* override.
*/
DEFINE_PROP_UINT32("phy_addr", SunGEMState, phy_addr, 0),
- DEFINE_PROP_END_OF_LIST(),
};
static const VMStateDescription vmstate_sungem = {
@@ -1455,7 +1454,7 @@ static const VMStateDescription vmstate_sungem = {
}
};
-static void sungem_class_init(ObjectClass *klass, void *data)
+static void sungem_class_init(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
@@ -1467,7 +1466,7 @@ static void sungem_class_init(ObjectClass *klass, void *data)
k->revision = 0x01;
k->class_id = PCI_CLASS_NETWORK_ETHERNET;
dc->vmsd = &vmstate_sungem;
- dc->reset = sungem_reset;
+ device_class_set_legacy_reset(dc, sungem_reset);
device_class_set_props(dc, sungem_properties);
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
}
@@ -1478,7 +1477,7 @@ static const TypeInfo sungem_info = {
.instance_size = sizeof(SunGEMState),
.class_init = sungem_class_init,
.instance_init = sungem_instance_init,
- .interfaces = (InterfaceInfo[]) {
+ .interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ }
}