aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-10-07 16:56:18 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-12 09:42:30 -0500
commit61073e0f53f6906f43db309720fc2232ed7d9a13 (patch)
treed422b894457d192dbf1a35f5566f99f4fc0b221f
parentf514f41c459e7b03d88465900dee13951850d6dd (diff)
downloadqemu-61073e0f53f6906f43db309720fc2232ed7d9a13.zip
qemu-61073e0f53f6906f43db309720fc2232ed7d9a13.tar.gz
qemu-61073e0f53f6906f43db309720fc2232ed7d9a13.tar.bz2
ide: change cast to DO_UPCAST
Patchworks-ID: 35293 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/ide/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 9504e44..81bc6a7 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -62,7 +62,7 @@ static void cmd646_update_irq(PCIIDEState *d);
static void ide_map(PCIDevice *pci_dev, int region_num,
uint32_t addr, uint32_t size, int type)
{
- PCIIDEState *d = (PCIIDEState *)pci_dev;
+ PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev);
IDEBus *bus;
if (region_num <= 3) {
@@ -247,7 +247,7 @@ static void bmdma_addr_writel(void *opaque, uint32_t addr, uint32_t val)
static void bmdma_map(PCIDevice *pci_dev, int region_num,
uint32_t addr, uint32_t size, int type)
{
- PCIIDEState *d = (PCIIDEState *)pci_dev;
+ PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev);
int i;
for(i = 0;i < 2; i++) {