From 0be4e88621df69f044e043f0f16d4017d35f30ae Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 6 Jun 2017 17:44:11 +1000 Subject: spapr: Change DRC attach & detach methods to functions DRC objects have attach & detach methods, but there's only one implementation. Although there are some differences in its behaviour for different DRC types, the overall structure is the same, so while we might want different method implementations for some parts, we're unlikely to want them for the top-level functions. So, replace them with direct function calls. Signed-off-by: David Gibson Reviewed-by: Michael Roth Acked-by: Michael Roth --- include/hw/ppc/spapr_drc.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h index 70db573e80..4f82001109 100644 --- a/include/hw/ppc/spapr_drc.h +++ b/include/hw/ppc/spapr_drc.h @@ -226,9 +226,6 @@ typedef struct sPAPRDRConnectorClass { const char *(*get_name)(sPAPRDRConnector *drc); /* QEMU interfaces for managing hotplug operations */ - void (*attach)(sPAPRDRConnector *drc, DeviceState *d, void *fdt, - int fdt_start_offset, bool coldplug, Error **errp); - void (*detach)(sPAPRDRConnector *drc, DeviceState *d, Error **errp); bool (*release_pending)(sPAPRDRConnector *drc); void (*set_signalled)(sPAPRDRConnector *drc); } sPAPRDRConnectorClass; @@ -243,4 +240,8 @@ sPAPRDRConnector *spapr_drc_by_id(const char *type, uint32_t id); int spapr_drc_populate_dt(void *fdt, int fdt_offset, Object *owner, uint32_t drc_type_mask); +void spapr_drc_attach(sPAPRDRConnector *drc, DeviceState *d, void *fdt, + int fdt_start_offset, bool coldplug, Error **errp); +void spapr_drc_detach(sPAPRDRConnector *drc, DeviceState *d, Error **errp); + #endif /* HW_SPAPR_DRC_H */ -- cgit v1.2.3-55-g7522