From patchwork Tue Mar 5 17:51:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 225134 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 5D23B2C031A for ; Wed, 6 Mar 2013 04:59:55 +1100 (EST) Received: from localhost ([::1]:34614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCw9Z-0006jm-Jx for incoming@patchwork.ozlabs.org; Tue, 05 Mar 2013 12:59:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCw6H-0000xz-ID for qemu-devel@nongnu.org; Tue, 05 Mar 2013 12:57:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCw62-0000Q3-2k for qemu-devel@nongnu.org; Tue, 05 Mar 2013 12:56:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCw61-0000Px-RO for qemu-devel@nongnu.org; Tue, 05 Mar 2013 12:56:14 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r25HuChP005438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Mar 2013 12:56:12 -0500 Received: from localhost (ovpn-113-84.phx2.redhat.com [10.3.113.84]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r25HtUdx010694; Tue, 5 Mar 2013 12:55:33 -0500 From: Amit Shah To: qemu list Date: Tue, 5 Mar 2013 23:21:30 +0530 Message-Id: <1b24baa1ec3a174d5cad31e079d829904b53077b.1362505276.git.amit.shah@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Amit Shah , Anthony Liguori , Anthony Liguori Subject: [Qemu-devel] [PATCH 15/20] qemu-char: move baum registration to baum.c 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 From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Amit Shah --- hw/baum.c | 9 ++++++++- hw/baum.h | 30 ------------------------------ qemu-char.c | 4 ---- vl.c | 1 - 4 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 hw/baum.h diff --git a/hw/baum.c b/hw/baum.c index 09dcb9c..d75b150 100644 --- a/hw/baum.c +++ b/hw/baum.c @@ -562,7 +562,7 @@ static void baum_close(struct CharDriverState *chr) g_free(baum); } -CharDriverState *chr_baum_init(QemuOpts *opts) +static CharDriverState *chr_baum_init(QemuOpts *opts) { BaumDriverState *baum; CharDriverState *chr; @@ -625,3 +625,10 @@ fail_handle: g_free(baum); return NULL; } + +static void register_types(void) +{ + register_char_driver("braille", chr_baum_init); +} + +type_init(register_types); diff --git a/hw/baum.h b/hw/baum.h deleted file mode 100644 index 7635884..0000000 --- a/hw/baum.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * QEMU Baum - * - * Copyright (c) 2008 Samuel Thibault - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -#ifndef HW_BAUM_H -#define HW_BAUM_H 1 - -/* char device */ -CharDriverState *chr_baum_init(QemuOpts *opts); - -#endif diff --git a/qemu-char.c b/qemu-char.c index 2e9f92e..6fcd2da 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -28,7 +28,6 @@ #include "qemu/timer.h" #include "char/char.h" #include "hw/usb.h" -#include "hw/baum.h" #include "hw/msmouse.h" #include "qmp-commands.h" @@ -3678,9 +3677,6 @@ static void register_types(void) register_char_driver("pipe", qemu_chr_open_pipe); register_char_driver("stdio", qemu_chr_open_stdio); #endif -#ifdef CONFIG_BRLAPI - register_char_driver("braille", chr_baum_init); -#endif #ifdef HAVE_CHARDEV_TTY register_char_driver("tty", qemu_chr_open_tty); register_char_driver("serial", qemu_chr_open_tty); diff --git a/vl.c b/vl.c index c03edf1..5dc0558 100644 --- a/vl.c +++ b/vl.c @@ -119,7 +119,6 @@ int main(int argc, char **argv) #include "hw/pcmcia.h" #include "hw/pc.h" #include "hw/isa.h" -#include "hw/baum.h" #include "hw/bt.h" #include "hw/watchdog.h" #include "hw/smbios.h"