[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [COMMIT 377a7f0] ne2000: Change casts to DO_UPCAST() forP
From: |
Anthony Liguori |
Subject: |
[Qemu-commits] [COMMIT 377a7f0] ne2000: Change casts to DO_UPCAST() forPCINE2000State |
Date: |
Fri, 28 Aug 2009 02:20:10 -0000 |
From: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/hw/ne2000.c b/hw/ne2000.c
index e8a7763..044e3a9 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [COMMIT 377a7f0] ne2000: Change casts to DO_UPCAST() forPCINE2000State,
Anthony Liguori <=