提交 61073e0f 编写于 作者: J Juan Quintela 提交者: Anthony Liguori

ide: change cast to DO_UPCAST

Patchworks-ID: 35293
Signed-off-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 f514f41c
...@@ -62,7 +62,7 @@ static void cmd646_update_irq(PCIIDEState *d); ...@@ -62,7 +62,7 @@ static void cmd646_update_irq(PCIIDEState *d);
static void ide_map(PCIDevice *pci_dev, int region_num, static void ide_map(PCIDevice *pci_dev, int region_num,
uint32_t addr, uint32_t size, int type) uint32_t addr, uint32_t size, int type)
{ {
PCIIDEState *d = (PCIIDEState *)pci_dev; PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev);
IDEBus *bus; IDEBus *bus;
if (region_num <= 3) { if (region_num <= 3) {
...@@ -247,7 +247,7 @@ static void bmdma_addr_writel(void *opaque, uint32_t addr, uint32_t val) ...@@ -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, static void bmdma_map(PCIDevice *pci_dev, int region_num,
uint32_t addr, uint32_t size, int type) uint32_t addr, uint32_t size, int type)
{ {
PCIIDEState *d = (PCIIDEState *)pci_dev; PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev);
int i; int i;
for(i = 0;i < 2; i++) { for(i = 0;i < 2; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册