mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
This converts existing DECLARE_INSTANCE_CHECKER usage to OBJECT_DECLARE_SIMPLE_TYPE when possible. $ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Paul Durrant <paul@xen.org> Message-Id: <20200916182519.415636-6-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
a489d1951c
commit
8063396bf3
505 changed files with 609 additions and 1795 deletions
|
@ -9,9 +9,7 @@
|
|||
/* pflash_cfi01.c */
|
||||
|
||||
#define TYPE_PFLASH_CFI01 "cfi.pflash01"
|
||||
typedef struct PFlashCFI01 PFlashCFI01;
|
||||
DECLARE_INSTANCE_CHECKER(PFlashCFI01, PFLASH_CFI01,
|
||||
TYPE_PFLASH_CFI01)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(PFlashCFI01, PFLASH_CFI01)
|
||||
|
||||
|
||||
PFlashCFI01 *pflash_cfi01_register(hwaddr base,
|
||||
|
@ -30,9 +28,7 @@ void pflash_cfi01_legacy_drive(PFlashCFI01 *dev, DriveInfo *dinfo);
|
|||
/* pflash_cfi02.c */
|
||||
|
||||
#define TYPE_PFLASH_CFI02 "cfi.pflash02"
|
||||
typedef struct PFlashCFI02 PFlashCFI02;
|
||||
DECLARE_INSTANCE_CHECKER(PFlashCFI02, PFLASH_CFI02,
|
||||
TYPE_PFLASH_CFI02)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(PFlashCFI02, PFLASH_CFI02)
|
||||
|
||||
|
||||
PFlashCFI02 *pflash_cfi02_register(hwaddr base,
|
||||
|
|
|
@ -17,13 +17,10 @@
|
|||
|
||||
#define SWIM_MAX_FD 2
|
||||
|
||||
typedef struct SWIMDrive SWIMDrive;
|
||||
typedef struct SWIMBus SWIMBus;
|
||||
typedef struct SWIMCtrl SWIMCtrl;
|
||||
|
||||
#define TYPE_SWIM_DRIVE "swim-drive"
|
||||
DECLARE_INSTANCE_CHECKER(SWIMDrive, SWIM_DRIVE,
|
||||
TYPE_SWIM_DRIVE)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(SWIMDrive, SWIM_DRIVE)
|
||||
|
||||
struct SWIMDrive {
|
||||
DeviceState qdev;
|
||||
|
@ -32,8 +29,7 @@ struct SWIMDrive {
|
|||
};
|
||||
|
||||
#define TYPE_SWIM_BUS "swim-bus"
|
||||
DECLARE_INSTANCE_CHECKER(SWIMBus, SWIM_BUS,
|
||||
TYPE_SWIM_BUS)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(SWIMBus, SWIM_BUS)
|
||||
|
||||
struct SWIMBus {
|
||||
BusState bus;
|
||||
|
@ -70,9 +66,7 @@ struct SWIMCtrl {
|
|||
};
|
||||
|
||||
#define TYPE_SWIM "swim"
|
||||
typedef struct Swim Swim;
|
||||
DECLARE_INSTANCE_CHECKER(Swim, SWIM,
|
||||
TYPE_SWIM)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(Swim, SWIM)
|
||||
|
||||
struct Swim {
|
||||
SysBusDevice parent_obj;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue