mirror of https://github.com/xemu-project/xemu.git
e1000: Rename QOM class cast macros
Rename the E1000_DEVICE_CLASS() and E1000_DEVICE_GET_CLASS() macros to be consistent with the E1000() instance cast macro. This will allow us to register the type cast macros using OBJECT_DECLARE_TYPE later. 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-2-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
fadb055bd4
commit
c51325d865
|
@ -151,9 +151,9 @@ typedef struct E1000BaseClass {
|
|||
#define E1000(obj) \
|
||||
OBJECT_CHECK(E1000State, (obj), TYPE_E1000_BASE)
|
||||
|
||||
#define E1000_DEVICE_CLASS(klass) \
|
||||
#define E1000_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(E1000BaseClass, (klass), TYPE_E1000_BASE)
|
||||
#define E1000_DEVICE_GET_CLASS(obj) \
|
||||
#define E1000_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(E1000BaseClass, (obj), TYPE_E1000_BASE)
|
||||
|
||||
static void
|
||||
|
@ -365,7 +365,7 @@ e1000_autoneg_timer(void *opaque)
|
|||
static void e1000_reset(void *opaque)
|
||||
{
|
||||
E1000State *d = opaque;
|
||||
E1000BaseClass *edc = E1000_DEVICE_GET_CLASS(d);
|
||||
E1000BaseClass *edc = E1000_GET_CLASS(d);
|
||||
uint8_t *macaddr = d->conf.macaddr.a;
|
||||
|
||||
timer_del(d->autoneg_timer);
|
||||
|
@ -1751,7 +1751,7 @@ static void e1000_class_init(ObjectClass *klass, void *data)
|
|||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
|
||||
E1000BaseClass *e = E1000_DEVICE_CLASS(klass);
|
||||
E1000BaseClass *e = E1000_CLASS(klass);
|
||||
const E1000Info *info = data;
|
||||
|
||||
k->realize = pci_e1000_realize;
|
||||
|
|
Loading…
Reference in New Issue