From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z31As-0002SL-I9 for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:01:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z31An-0008L8-IK for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:01:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z31An-0008Ku-CW for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:01:29 -0400 Date: Thu, 11 Jun 2015 14:01:25 +0200 From: "Michael S. Tsirkin" Message-ID: <1434023714-30366-39-git-send-email-mst@redhat.com> References: <1434023714-30366-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1434023714-30366-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 38/42] virtio-serial-bus: move qdev properties into virtio-serial-bus.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Amit Shah , Shannon Zhao , Shannon Zhao , Cornelia Huck , Paolo Bonzini From: Shannon Zhao As only one place in virtio-serial-bus.c uses DEFINE_VIRTIO_SERIAL_PROPERTIES, there is no need to expose it. Inline it into virtio-serial-bus.c to avoid wrongly use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Paolo Bonzini Acked-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-serial.h | 3 --- hw/char/virtio-serial-bus.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h index 18d1bcc..527d0bf 100644 --- a/include/hw/virtio/virtio-serial.h +++ b/include/hw/virtio/virtio-serial.h @@ -221,7 +221,4 @@ void virtio_serial_throttle_port(VirtIOSerialPort *port, bool throttle); #define VIRTIO_SERIAL(obj) \ OBJECT_CHECK(VirtIOSerial, (obj), TYPE_VIRTIO_SERIAL) -#define DEFINE_VIRTIO_SERIAL_PROPERTIES(_state, _field) \ - DEFINE_PROP_UINT32("max_ports", _state, _field.max_virtserial_ports, 31) - #endif diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index f893523..d451b22 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -1083,7 +1083,8 @@ static void virtio_serial_device_unrealize(DeviceState *dev, Error **errp) } static Property virtio_serial_properties[] = { - DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOSerial, serial), + DEFINE_PROP_UINT32("max_ports", VirtIOSerial, serial.max_virtserial_ports, + 31), DEFINE_PROP_END_OF_LIST(), }; -- MST