[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/20] cmd646: register cmd646_reset() function in DeviceClass
From: |
John Snow |
Subject: |
[PULL 01/20] cmd646: register cmd646_reset() function in DeviceClass |
Date: |
Tue, 17 Mar 2020 19:23:10 -0400 |
From: Mark Cave-Ayland <address@hidden>
Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>
---
hw/ide/cmd646.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 335c060673..2f11d8de24 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -207,9 +207,9 @@ static void cmd646_set_irq(void *opaque, int channel, int
level)
cmd646_update_irq(pd);
}
-static void cmd646_reset(void *opaque)
+static void cmd646_reset(DeviceState *dev)
{
- PCIIDEState *d = opaque;
+ PCIIDEState *d = PCI_IDE(dev);
unsigned int i;
for (i = 0; i < 2; i++) {
@@ -303,7 +303,6 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Error
**errp)
g_free(irq);
vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d);
- qemu_register_reset(cmd646_reset, d);
}
static void pci_cmd646_ide_exitfn(PCIDevice *dev)
@@ -339,6 +338,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, void
*data)
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+ dc->reset = cmd646_reset;
k->realize = pci_cmd646_ide_realize;
k->exit = pci_cmd646_ide_exitfn;
k->vendor_id = PCI_VENDOR_ID_CMD;
--
2.21.1
- [PULL 00/20] Ide patches, John Snow, 2020/03/17
- [PULL 01/20] cmd646: register cmd646_reset() function in DeviceClass,
John Snow <=
- [PULL 02/20] cmd646: register vmstate_ide_pci VMStateDescription in DeviceClass, John Snow, 2020/03/17
- [PULL 03/20] dp264: use pci_create_simple() to initialise the cmd646 device, John Snow, 2020/03/17
- [PULL 04/20] cmd646: remove unused pci_cmd646_ide_init() function, John Snow, 2020/03/17
- [PULL 05/20] via-ide: move registration of VMStateDescription to DeviceClass, John Snow, 2020/03/17
- [PULL 06/20] ide/via: Get rid of via_ide_init(), John Snow, 2020/03/17
- [PULL 07/20] pci: Honour wmask when resetting PCI_INTERRUPT_LINE, John Snow, 2020/03/17
- [PULL 08/20] via-ide: ensure that PCI_INTERRUPT_LINE is hard-wired to its default value, John Snow, 2020/03/17
- [PULL 09/20] via-ide: initialise IDE controller in legacy mode, John Snow, 2020/03/17
- [PULL 10/20] via-ide: allow guests to write to PCI_CLASS_PROG, John Snow, 2020/03/17
- [PULL 11/20] via-ide: always use legacy IRQ 14/15 routing, John Snow, 2020/03/17