lsi53c895a: LSIState is a DeviceHost
authorJuan Quintela <quintela@redhat.com>
Mon, 24 Aug 2009 16:42:44 +0000 (18:42 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 28 Aug 2009 01:46:59 +0000 (20:46 -0500)
Go figure.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

hw/lsi53c895a.c

index 0d8248e..bf9f072 100644 (file)
@@ -1960,7 +1960,7 @@ static void lsi_mmio_mapfunc(PCIDevice *pci_dev, int region_num,
 
 void lsi_scsi_attach(DeviceState *host, BlockDriverState *bd, int id)
 {
-    LSIState *s = (LSIState *)host;
+    LSIState *s = DO_UPCAST(LSIState, dev.qdev, host);
 
     if (id < 0) {
         for (id = 0; id < LSI_MAX_DEVS; id++) {