mcf_fec: Move mcf_fec_state typedef to header
authorEduardo Habkost <ehabkost@redhat.com>
Tue, 25 Aug 2020 19:20:16 +0000 (15:20 -0400)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 27 Aug 2020 18:04:54 +0000 (14:04 -0400)
Move typedef closer to the type check macros, to make it easier
to convert the code to OBJECT_DEFINE_TYPE() in the future.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20200825192110.3528606-21-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/net/mcf_fec.c
include/hw/m68k/mcf_fec.h

index 281345862c27f1ba78cee93f54bc591399662c67..25e3e453ab12dff8912ca57a7865cbd37fa94b5e 100644 (file)
@@ -32,7 +32,7 @@ do { printf("mcf_fec: " fmt , ## __VA_ARGS__); } while (0)
 #define FEC_MAX_FRAME_SIZE 2032
 #define FEC_MIB_SIZE 64
 
-typedef struct {
+struct mcf_fec_state {
     SysBusDevice parent_obj;
 
     MemoryRegion iomem;
@@ -56,7 +56,7 @@ typedef struct {
     uint32_t etdsr;
     uint32_t emrbr;
     uint32_t mib[FEC_MIB_SIZE];
-} mcf_fec_state;
+};
 
 #define FEC_INT_HB   0x80000000
 #define FEC_INT_BABR 0x40000000
index eeb471f9c9c598ed32645909fd743a8152e54cd5..c09e33a57c82ffa92aa9356d6a0ebfa71bb2a3ab 100644 (file)
@@ -11,6 +11,7 @@
 #define HW_M68K_MCF_FEC_H
 
 #define TYPE_MCF_FEC_NET "mcf-fec"
+typedef struct mcf_fec_state mcf_fec_state;
 #define MCF_FEC_NET(obj) OBJECT_CHECK(mcf_fec_state, (obj), TYPE_MCF_FEC_NET)
 
 #define FEC_NUM_IRQ 13