mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
hw/hyperv/balloon: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES
The QOM type of HvBalloon is declared by OBJECT_DECLARE_SIMPLE_TYPE, which means it doesn't need the class! Therefore, use OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES to implement the type, then there's no need for class definition. Cc: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com> Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Acked-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Message-ID: <20250514084957.2221975-6-zhao1.liu@intel.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
17612f972f
commit
8cab2354a2
1 changed files with 3 additions and 6 deletions
|
@ -67,10 +67,6 @@
|
|||
* these requests
|
||||
*/
|
||||
|
||||
struct HvBalloonClass {
|
||||
VMBusDeviceClass parent_class;
|
||||
} HvBalloonClass;
|
||||
|
||||
typedef enum State {
|
||||
/* not a real state */
|
||||
S_NO_CHANGE = 0,
|
||||
|
@ -162,8 +158,9 @@ typedef struct HvBalloon {
|
|||
MemoryRegion *mr;
|
||||
} HvBalloon;
|
||||
|
||||
OBJECT_DEFINE_TYPE_WITH_INTERFACES(HvBalloon, hv_balloon, HV_BALLOON, VMBUS_DEVICE, \
|
||||
{ TYPE_MEMORY_DEVICE }, { })
|
||||
OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(HvBalloon, hv_balloon, \
|
||||
HV_BALLOON, VMBUS_DEVICE, \
|
||||
{ TYPE_MEMORY_DEVICE }, { })
|
||||
|
||||
#define HV_BALLOON_SET_STATE(hvb, news) \
|
||||
do { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue