summaryrefslogtreecommitdiff
path: root/hw/ne2000.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-08-24 18:42:51 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-27 20:46:59 -0500
commit377a7f0694f1d119169665e6f3f85b14f588a1ec (patch)
tree30803834b419853200b574c9d9c091a8ea5fdaaf /hw/ne2000.c
parent94a943ef5b56c5773a3fd5c8e93be3f16268d9a9 (diff)
downloadqemu-377a7f0694f1d119169665e6f3f85b14f588a1ec.tar.gz
qemu-377a7f0694f1d119169665e6f3f85b14f588a1ec.tar.bz2
qemu-377a7f0694f1d119169665e6f3f85b14f588a1ec.zip
ne2000: Change casts to DO_UPCAST() for PCINE2000State
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ne2000.c')
-rw-r--r--hw/ne2000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ne2000.c b/hw/ne2000.c
index e8a77635b9..044e3a9346 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -779,7 +779,7 @@ typedef struct PCINE2000State {
static void ne2000_map(PCIDevice *pci_dev, int region_num,
uint32_t addr, uint32_t size, int type)
{
- PCINE2000State *d = (PCINE2000State *)pci_dev;
+ PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev);
NE2000State *s = &d->ne2000;
register_ioport_write(addr, 16, 1, ne2000_ioport_write, s);
@@ -805,7 +805,7 @@ static void ne2000_cleanup(VLANClientState *vc)
static int pci_ne2000_init(PCIDevice *pci_dev)
{
- PCINE2000State *d = (PCINE2000State *)pci_dev;
+ PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev);
NE2000State *s;
uint8_t *pci_conf;