This enables them to be used outside of lance.c. Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> CC: Jason Wang <jasow...@redhat.com> --- hw/net/lance.c | 9 --------- include/hw/sparc/sun4m.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/hw/net/lance.c b/hw/net/lance.c index 92b0c68..ef7747d 100644 --- a/hw/net/lance.c +++ b/hw/net/lance.c @@ -45,15 +45,6 @@ #include "trace.h" #include "sysemu/sysemu.h" -#define TYPE_LANCE "lance" -#define SYSBUS_PCNET(obj) \ - OBJECT_CHECK(SysBusPCNetState, (obj), TYPE_LANCE) - -typedef struct { - SysBusDevice parent_obj; - - PCNetState state; -} SysBusPCNetState; static void parent_lance_reset(void *opaque, int irq, int level) { diff --git a/include/hw/sparc/sun4m.h b/include/hw/sparc/sun4m.h index 1f1cf91..a4f5f09 100644 --- a/include/hw/sparc/sun4m.h +++ b/include/hw/sparc/sun4m.h @@ -5,6 +5,8 @@ #include "exec/hwaddr.h" #include "qapi/qmp/types.h" #include "hw/sysbus.h" +#include "net/net.h" +#include "hw/net/pcnet.h" /* Devices used by sparc32 system. */ @@ -40,6 +42,17 @@ static inline void sparc_iommu_memory_write(void *opaque, sparc_iommu_memory_rw(opaque, addr, buf, len, 1); } +/* lance.c */ +#define TYPE_LANCE "lance" +#define SYSBUS_PCNET(obj) \ + OBJECT_CHECK(SysBusPCNetState, (obj), TYPE_LANCE) + +typedef struct { + SysBusDevice parent_obj; + + PCNetState state; +} SysBusPCNetState; + /* sparc32_dma.c */ #include "hw/sparc/sparc32_dma.h" -- 1.7.10.4