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: 14632 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id BC66B23F99 for ; Wed, 6 Feb 2013 11:48:31 +0000 (UTC) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by fiordland.canonical.com (Postfix) with ESMTP id 8AE37A180D1 for ; Wed, 6 Feb 2013 11:48:31 +0000 (UTC) Received: by mail-ve0-f176.google.com with SMTP id cz10so1028963veb.7 for ; Wed, 06 Feb 2013 03:48:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=CVkVGCmYBSPjnqohwFCmpf0gfwLQmBrPOrhSSoc5i1A=; b=O96QAK7OQaEQiSzvwWGgq93oTiR+aU2RmQLTSOTsrZFyczQfEsKntgwHPs9UkVTR6w ycGvjRK8ubd+XC0Oe0MVGfQIm/E/x4eZCyV0xz0tDBFaMMoyK9SW2uCfCS2YJV5PNU5v vZLE/JtTCps6ak9cURllPFVcwTh/d79NezTQ5kwUf2HqebWAsZlKRr5AHp6H/WGRuYrb Z/5zxbSepkNzce10ppCfCtEMFm2zZpeR8r6HkMNH/FjFgGFnsP/HVMdD921zY+Oko0+g iHfRIya54b5dhJcp3S8Y75VLZhIJPfLATdnUKtC2Vb3tKoTqAltREOBzH1Tnr5+6MzgL U+0g== X-Received: by 10.58.48.231 with SMTP id p7mr28849690ven.11.1360151311110; Wed, 06 Feb 2013 03:48:31 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp17332vec; Wed, 6 Feb 2013 03:48:30 -0800 (PST) X-Received: by 10.66.73.5 with SMTP id h5mr74622767pav.11.1360151310080; Wed, 06 Feb 2013 03:48:30 -0800 (PST) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by mx.google.com with ESMTPS id y1si28574574pav.16.2013.02.06.03.48.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Feb 2013 03:48:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.220.43; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) smtp.mail=haojian.zhuang@linaro.org Received: by mail-pa0-f43.google.com with SMTP id bh2so759451pad.2 for ; Wed, 06 Feb 2013 03:48:29 -0800 (PST) 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 Cc: patches@linaro.org, Haojian Zhuang , Alan Cox , Greg Kroah-Hartman , linux-serial@vger.kernel.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: ALoCoQlepJMOPHENmkjZxGid6MDSXJoDa31dNx2mb1eBNdP3tPYf9m1COiwlqNC0W8oe+NoZXEvu 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;