Skip to content

Commit

Permalink
virtio-serial-bus: Move QOM macros to header
Browse files Browse the repository at this point in the history
This will make future conversion to OBJECT_DECLARE* easier.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20200825192110.3528606-36-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
  • Loading branch information
ehabkost committed Aug 27, 2020
1 parent 240b6cd commit b28b803
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions hw/char/virtio-serial-bus.c
Expand Up @@ -843,10 +843,6 @@ static Property virtser_props[] = {
DEFINE_PROP_END_OF_LIST()
};

#define TYPE_VIRTIO_SERIAL_BUS "virtio-serial-bus"
#define VIRTIO_SERIAL_BUS(obj) \
OBJECT_CHECK(VirtIOSerialBus, (obj), TYPE_VIRTIO_SERIAL_BUS)

static void virtser_bus_class_init(ObjectClass *klass, void *data)
{
BusClass *k = BUS_CLASS(klass);
Expand Down
5 changes: 5 additions & 0 deletions include/hw/virtio/virtio-serial.h
Expand Up @@ -33,7 +33,12 @@ struct virtio_serial_conf {
OBJECT_GET_CLASS(VirtIOSerialPortClass, (obj), TYPE_VIRTIO_SERIAL_PORT)

typedef struct VirtIOSerial VirtIOSerial;

#define TYPE_VIRTIO_SERIAL_BUS "virtio-serial-bus"
typedef struct VirtIOSerialBus VirtIOSerialBus;
#define VIRTIO_SERIAL_BUS(obj) \
OBJECT_CHECK(VirtIOSerialBus, (obj), TYPE_VIRTIO_SERIAL_BUS)

typedef struct VirtIOSerialPort VirtIOSerialPort;

typedef struct VirtIOSerialPortClass {
Expand Down

0 comments on commit b28b803

Please sign in to comment.