mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
4f65ce00ab
commit
0b55aa91c9
5 changed files with 44 additions and 54 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue