diff options
author | Greg Kurz <groug@kaod.org> | 2017-06-08 15:42:50 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-06-09 12:12:34 +1000 |
commit | 100f738850639a108d6767316ce4dcc1d1ea4ae4 (patch) | |
tree | 93f9e62c7818d3f2437ae2b9c1d7dd28407d8aa8 /hw/intc/xics_pnv.c | |
parent | ad265631c0a0addc06ec3c4f133e746f4dcc872a (diff) |
xics: pass appropriate types to realize() handlers.
It makes more sense to pass an IPCState * to handlers of ICPStateClass
instead of a DeviceState *, if only to benefit from compile time type
checking. The same goes with ICSStateClass.
While here, we also change the declaration of ICPStateClass in xics.h
for consistency.
Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc/xics_pnv.c')
-rw-r--r-- | hw/intc/xics_pnv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/intc/xics_pnv.c b/hw/intc/xics_pnv.c index 12ae605f10..2a955a8946 100644 --- a/hw/intc/xics_pnv.c +++ b/hw/intc/xics_pnv.c @@ -159,11 +159,11 @@ static const MemoryRegionOps pnv_icp_ops = { }, }; -static void pnv_icp_realize(DeviceState *dev, Error **errp) +static void pnv_icp_realize(ICPState *icp, Error **errp) { - PnvICPState *icp = PNV_ICP(dev); + PnvICPState *pnv_icp = PNV_ICP(icp); - memory_region_init_io(&icp->mmio, OBJECT(dev), &pnv_icp_ops, + memory_region_init_io(&pnv_icp->mmio, OBJECT(icp), &pnv_icp_ops, icp, "icp-thread", 0x1000); } |