From 70ae65f5d91462e1905a53236179fde21cda3a2f Mon Sep 17 00:00:00 2001 From: "Igor V. Kovalenko" Date: Fri, 23 Apr 2010 01:54:45 +0400 Subject: cmd646: pass pci_dev as it needs it Instead of doing tricks to get the pci_dev, just pass it in the 1st place. Patch is a bit longer that reverting the pci_dev field, but it states more clearly (IMHO) what we are doing. It also fixes the bm test, now that you told me that ->unit is not always valid. Signed-off-by: Juan Quintela Signed-off-by: Igor V. Kovalenko Signed-off-by: Blue Swirl --- hw/ide/piix.c | 1 - 1 file changed, 1 deletion(-) (limited to 'hw/ide/piix.c') diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 295a93d078..4fa38519ef 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -78,7 +78,6 @@ static void bmdma_map(PCIDevice *pci_dev, int region_num, BMDMAState *bm = &d->bmdma[i]; d->bus[i].bmdma = bm; bm->bus = d->bus+i; - bm->pci_dev = d; qemu_add_vm_change_state_handler(ide_dma_restart_cb, bm); register_ioport_write(addr, 1, 1, bmdma_cmd_writeb, bm); -- cgit v1.2.3