diff options
author | Juan Quintela <quintela@redhat.com> | 2009-08-24 18:42:42 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-27 20:46:59 -0500 |
commit | dc5d0b9a8e1020be3bd3dd22f20d869db30e1b8c (patch) | |
tree | d0f6f7c34ea66db4a463717a989112d1267544d3 /hw | |
parent | eb40f9845be66125d1a672b81d202610fd0b3b1d (diff) | |
download | qemu-dc5d0b9a8e1020be3bd3dd22f20d869db30e1b8c.zip |
lsi53c895a: use DO_UPCAST to cast from PCIDevice
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/lsi53c895a.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index 6f872f1913..6ef9abf8b2 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c @@ -1927,7 +1927,7 @@ static void lsi_io_writel(void *opaque, uint32_t addr, uint32_t val) static void lsi_io_mapfunc(PCIDevice *pci_dev, int region_num, uint32_t addr, uint32_t size, int type) { - LSIState *s = (LSIState *)pci_dev; + LSIState *s = DO_UPCAST(LSIState, pci_dev, pci_dev); DPRINTF("Mapping IO at %08x\n", addr); @@ -1942,7 +1942,7 @@ static void lsi_io_mapfunc(PCIDevice *pci_dev, int region_num, static void lsi_ram_mapfunc(PCIDevice *pci_dev, int region_num, uint32_t addr, uint32_t size, int type) { - LSIState *s = (LSIState *)pci_dev; + LSIState *s = DO_UPCAST(LSIState, pci_dev, pci_dev); DPRINTF("Mapping ram at %08x\n", addr); s->script_ram_base = addr; @@ -1952,7 +1952,7 @@ static void lsi_ram_mapfunc(PCIDevice *pci_dev, int region_num, static void lsi_mmio_mapfunc(PCIDevice *pci_dev, int region_num, uint32_t addr, uint32_t size, int type) { - LSIState *s = (LSIState *)pci_dev; + LSIState *s = DO_UPCAST(LSIState, pci_dev, pci_dev); DPRINTF("Mapping registers at %08x\n", addr); cpu_register_physical_memory(addr + 0, 0x400, s->mmio_io_addr); @@ -2153,7 +2153,7 @@ static int lsi_scsi_load(QEMUFile *f, void *opaque, int version_id) static int lsi_scsi_uninit(PCIDevice *d) { - LSIState *s = (LSIState *) d; + LSIState *s = DO_UPCAST(LSIState, pci_dev, d); cpu_unregister_io_memory(s->mmio_io_addr); cpu_unregister_io_memory(s->ram_io_addr); @@ -2165,7 +2165,7 @@ static int lsi_scsi_uninit(PCIDevice *d) static int lsi_scsi_init(PCIDevice *dev) { - LSIState *s = (LSIState *)dev; + LSIState *s = DO_UPCAST(LSIState, pci_dev, dev); uint8_t *pci_conf; pci_conf = s->pci_dev.config; |