From patchwork Wed Feb 6 11:47:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2103841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3EEE7DF2A1 for ; Wed, 6 Feb 2013 11:51:42 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U33UQ-000149-SO; Wed, 06 Feb 2013 11:48:34 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U33UO-00013W-1X for linux-arm-kernel@lists.infradead.org; Wed, 06 Feb 2013 11:48:32 +0000 Received: by mail-pa0-f49.google.com with SMTP id kp6so773190pab.36 for ; Wed, 06 Feb 2013 03:48:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=CVkVGCmYBSPjnqohwFCmpf0gfwLQmBrPOrhSSoc5i1A=; b=ifMG5TybqXRk+ZQJlOvvqOpoScWaNGX35Rt2aKL6Te3cRJuXp8zm+Us/StzC8imvMy bhtF54eB3zO7oDF8ErxkmH2BAiZlutwzKDPkfYmqqE5B/vMLsXf4ni6sTNpWWYPyBVQL BhxB+V6YHPRm/KTy5SvIotHba7kDKva3ir5PO93wAf1Pd7hFKxlVMtJdasgMAVghdU9/ u38bZU9K2Z8QrUhajGvFsdd9mT/E6IG3ihyhbSlxi5SdnraSq6DQdcFxl3Ci1YGhg5CQ lWRzgoBdEf1/k8T5xptgoSH6ZCY6PcYJUL0VH3odKsRc5jclA7EPg0rmmHtPuUypUrE6 xamg== X-Received: by 10.66.79.231 with SMTP id m7mr25090925pax.76.1360151309537; Wed, 06 Feb 2013 03:48:29 -0800 (PST) Received: from localhost.localdomain ([67.198.145.34]) by mx.google.com with ESMTPS id f9sm37145024paz.12.2013.02.06.03.48.24 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Feb 2013 03:48:28 -0800 (PST) From: Haojian Zhuang To: jslaby@suse.cz, linus.walleij@linaro.org, anton.vorontsov@linaro.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] tty: serial: remove __init on pl011 console ops Date: Wed, 6 Feb 2013 19:47:14 +0800 Message-Id: <1360151235-11980-1-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQlEc8F8MeWKFmvdcpGedGVCI/DnGPdozuNJIvpwx69DTk8bMDqWTzSGQGPWpt9kkYMN1y9U X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130206_064832_242173_1F22B0FC X-CRM114-Status: GOOD ( 10.90 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.49 listed in list.dnswl.org] Cc: Greg Kroah-Hartman , Alan Cox , Haojian Zhuang , linux-serial@vger.kernel.org, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If uart driver is probed defer, console_setup will be called later after __init && __initdata sections destroyed. And amba_console isn't defined in __init or __initdata section. So we needn't define pl011_console_setup() && pl011_console_get_options() in __init section. Signed-off-by: Haojian Zhuang Cc: Alan Cox Cc: Greg Kroah-Hartman Cc: linux-serial@vger.kernel.org --- drivers/tty/serial/amba-pl011.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 3ea5408..d43d530 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1810,7 +1810,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) clk_disable(uap->clk); } -static void __init +static void pl011_console_get_options(struct uart_amba_port *uap, int *baud, int *parity, int *bits) { @@ -1845,7 +1845,7 @@ pl011_console_get_options(struct uart_amba_port *uap, int *baud, } } -static int __init pl011_console_setup(struct console *co, char *options) +static int pl011_console_setup(struct console *co, char *options) { struct uart_amba_port *uap; int baud = 38400;