aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2017-06-02 13:49:20 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2017-06-06 08:53:24 +1000
commit0b55aa91c976b30b527c123fb66d25f5db43d083 (patch)
treea7dbaf524ccba80cbfda61525ba8b59567db20c6 /include/hw
parent4f65ce00ab9b059ed1aadc18718760ffd0c60a68 (diff)
spapr: Make DRC get_index and get_type methods into plain functions
These two methods only have one implementation, and the spec they're implementing means any other implementation is unlikely, verging on impossible. So replace them with simple functions. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/ppc/spapr_drc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h
index 90f49534d6..10e7c2473c 100644
--- a/include/hw/ppc/spapr_drc.h
+++ b/include/hw/ppc/spapr_drc.h
@@ -171,8 +171,6 @@ typedef struct sPAPRDRConnectorClass {
sPAPRDRIndicatorState state);
uint32_t (*set_allocation_state)(sPAPRDRConnector *drc,
sPAPRDRAllocationState state);
- uint32_t (*get_index)(sPAPRDRConnector *drc);
- uint32_t (*get_type)(sPAPRDRConnector *drc);
const char *(*get_name)(sPAPRDRConnector *drc);
uint32_t (*entity_sense)(sPAPRDRConnector *drc, sPAPRDREntitySense *state);
@@ -185,6 +183,9 @@ typedef struct sPAPRDRConnectorClass {
void (*set_signalled)(sPAPRDRConnector *drc);
} sPAPRDRConnectorClass;
+uint32_t spapr_drc_index(sPAPRDRConnector *drc);
+sPAPRDRConnectorType spapr_drc_type(sPAPRDRConnector *drc);
+
sPAPRDRConnector *spapr_dr_connector_new(Object *owner,
sPAPRDRConnectorType type,
uint32_t id);