From patchwork Thu Mar 14 16:36:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 227738 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 825282C00BC for ; Fri, 15 Mar 2013 03:36:42 +1100 (EST) Received: from localhost ([::1]:60162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGB8y-0000WJ-Ny for incoming@patchwork.ozlabs.org; Thu, 14 Mar 2013 12:36:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGB6K-00050a-R1 for qemu-devel@nongnu.org; Thu, 14 Mar 2013 12:33:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGB6F-0006b5-Np for qemu-devel@nongnu.org; Thu, 14 Mar 2013 12:33:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGB6F-0006an-H1 for qemu-devel@nongnu.org; Thu, 14 Mar 2013 12:33:51 -0400 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.14.4/8.14.4) with ESMTP id r2EGXoLL014987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 14 Mar 2013 12:33:50 -0400 Received: from shalem.localdomain.com (vpn1-4-60.ams2.redhat.com [10.36.4.60]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r2EGXbcZ007233; Thu, 14 Mar 2013 12:33:49 -0400 From: Hans de Goede To: qemu-devel@nongnu.org Date: Thu, 14 Mar 2013 17:36:55 +0100 Message-Id: <1363279017-3894-7-git-send-email-hdegoede@redhat.com> In-Reply-To: <1363279017-3894-1-git-send-email-hdegoede@redhat.com> References: <1363279017-3894-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Amit Shah , Hans de Goede , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann Subject: [Qemu-devel] [PATCH 6/8] spice-qemu-char: Move spice_chr_close down X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This puts it in a more logical place and avoids the need for forward declarations in the next patch of this series. Note no code changes, just moving it around. Signed-off-by: Hans de Goede --- spice-qemu-char.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/spice-qemu-char.c b/spice-qemu-char.c index 607abb6..530d9a6 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -199,6 +199,18 @@ static int spice_chr_write(CharDriverState *chr, const uint8_t *buf, int len) return read_bytes; } +static void spice_chr_guest_open(struct CharDriverState *chr) +{ + SpiceCharDriver *s = chr->opaque; + vmc_register_interface(s); +} + +static void spice_chr_guest_close(struct CharDriverState *chr) +{ + SpiceCharDriver *s = chr->opaque; + vmc_unregister_interface(s); +} + static void spice_chr_close(struct CharDriverState *chr) { SpiceCharDriver *s = chr->opaque; @@ -213,18 +225,6 @@ static void spice_chr_close(struct CharDriverState *chr) g_free(s); } -static void spice_chr_guest_open(struct CharDriverState *chr) -{ - SpiceCharDriver *s = chr->opaque; - vmc_register_interface(s); -} - -static void spice_chr_guest_close(struct CharDriverState *chr) -{ - SpiceCharDriver *s = chr->opaque; - vmc_unregister_interface(s); -} - static void print_allowed_subtypes(void) { const char** psubtype;