mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -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
|
@ -32,9 +32,7 @@ OBJECT_DECLARE_TYPE(VirtIOSerialPort, VirtIOSerialPortClass,
|
|||
typedef struct VirtIOSerial VirtIOSerial;
|
||||
|
||||
#define TYPE_VIRTIO_SERIAL_BUS "virtio-serial-bus"
|
||||
typedef struct VirtIOSerialBus VirtIOSerialBus;
|
||||
DECLARE_INSTANCE_CHECKER(VirtIOSerialBus, VIRTIO_SERIAL_BUS,
|
||||
TYPE_VIRTIO_SERIAL_BUS)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(VirtIOSerialBus, VIRTIO_SERIAL_BUS)
|
||||
|
||||
|
||||
struct VirtIOSerialPortClass {
|
||||
|
@ -224,7 +222,6 @@ size_t virtio_serial_guest_ready(VirtIOSerialPort *port);
|
|||
void virtio_serial_throttle_port(VirtIOSerialPort *port, bool throttle);
|
||||
|
||||
#define TYPE_VIRTIO_SERIAL "virtio-serial-device"
|
||||
DECLARE_INSTANCE_CHECKER(VirtIOSerial, VIRTIO_SERIAL,
|
||||
TYPE_VIRTIO_SERIAL)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(VirtIOSerial, VIRTIO_SERIAL)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue