From patchwork Thu Mar 24 02:20:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 657681 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2O2RpL2024857 for ; Thu, 24 Mar 2011 02:27:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755563Ab1CXC1t (ORCPT ); Wed, 23 Mar 2011 22:27:49 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:50784 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754915Ab1CXC1s (ORCPT ); Wed, 23 Mar 2011 22:27:48 -0400 Received: by pwi15 with SMTP id 15so1120776pwi.19 for ; Wed, 23 Mar 2011 19:27:48 -0700 (PDT) Received: by 10.142.224.7 with SMTP id w7mr5703289wfg.446.1300933668362; Wed, 23 Mar 2011 19:27:48 -0700 (PDT) Received: from localhost.localdomain (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id d35sm10835482wfj.9.2011.03.23.19.27.46 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2011 19:27:47 -0700 (PDT) From: Nobuhiro Iwamatsu To: linux-sh@vger.kernel.org Cc: Nobuhiro Iwamatsu Subject: [RFC/PATCH] sh: sh-sci: Fix double initialization by serial_console_setup Date: Thu, 24 Mar 2011 11:20:56 +0900 Message-Id: <1300933256-32372-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 1.7.2.3 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Mar 2011 02:27:51 +0000 (UTC) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 0257fd5..846e209 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1860,13 +1860,6 @@ static struct console serial_console = { .data = &sci_uart_driver, }; -static int __init sci_console_init(void) -{ - register_console(&serial_console); - return 0; -} -console_initcall(sci_console_init); - static struct console early_serial_console = { .name = "early_ttySC", .write = serial_console_write, @@ -1895,18 +1888,18 @@ static int __devinit sci_probe_earlyprintk(struct platform_device *pdev) register_console(&early_serial_console); return 0; } + +#define SCI_CONSOLE (&serial_console) + #else static inline int __devinit sci_probe_earlyprintk(struct platform_device *pdev) { return -EINVAL; } -#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ -#if defined(CONFIG_SERIAL_SH_SCI_CONSOLE) -#define SCI_CONSOLE (&serial_console) -#else -#define SCI_CONSOLE 0 -#endif +#define SCI_CONSOLE NULL + +#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ static char banner[] __initdata = KERN_INFO "SuperH SCI(F) driver initialized\n";