From patchwork Wed Jan 27 16:22:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 43824 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EE784B80CD for ; Thu, 28 Jan 2010 03:30:32 +1100 (EST) Received: from localhost ([127.0.0.1]:43639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaAi8-0004a3-P7 for incoming@patchwork.ozlabs.org; Wed, 27 Jan 2010 11:25:44 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NaAfw-0004Hu-7P for qemu-devel@nongnu.org; Wed, 27 Jan 2010 11:23:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NaAfr-0004FQ-M4 for qemu-devel@nongnu.org; Wed, 27 Jan 2010 11:23:27 -0500 Received: from [199.232.76.173] (port=59512 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaAfr-0004FI-EX for qemu-devel@nongnu.org; Wed, 27 Jan 2010 11:23:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35197) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NaAfr-0000z8-0q for qemu-devel@nongnu.org; Wed, 27 Jan 2010 11:23:23 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0RGNLan021711 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 27 Jan 2010 11:23:21 -0500 Received: from localhost (vpn-233-219.phx2.redhat.com [10.3.233.219]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0RGNJjV030987; Wed, 27 Jan 2010 11:23:20 -0500 From: Amit Shah To: qemu-devel@nongnu.org Date: Wed, 27 Jan 2010 21:52:19 +0530 Message-Id: <1264609339-24353-1-git-send-email-amit.shah@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Amit Shah Subject: [Qemu-devel] [PATCH] virtio-serial-bus: Fix bus initialisation and allow for bus identification X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This commit enables one to use multiple virtio-serial devices and to assign ports to arbitrary devices like this: -device virtio-serial,id=foo -device virtio-serial,id=bar \ -device virtserialport,bus=foo.0,name=foo \ -device virtserialport,bus=bar.0,name=bar Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 403268f..ab456ea 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -445,8 +445,7 @@ static VirtIOSerialBus *virtser_bus_new(DeviceState *dev) { VirtIOSerialBus *bus; - bus = FROM_QBUS(VirtIOSerialBus, qbus_create(&virtser_bus_info, dev, - "virtio-serial-bus")); + bus = FROM_QBUS(VirtIOSerialBus, qbus_create(&virtser_bus_info, dev, NULL)); bus->qbus.allow_hotplug = 1; return bus;