From patchwork Thu Nov 4 15:20:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 302102 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 oA4FM1Pi024313 for ; Thu, 4 Nov 2010 15:22:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752270Ab0KDPVW (ORCPT ); Thu, 4 Nov 2010 11:21:22 -0400 Received: from mail.pripojeni.net ([217.66.174.14]:33070 "EHLO smtp.pripojeni.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752070Ab0KDPVN (ORCPT ); Thu, 4 Nov 2010 11:21:13 -0400 Received: from localhost.localdomain ([217.66.174.142]) by smtp.pripojeni.net (Kerio Connect 7.1.1); Thu, 4 Nov 2010 16:20:25 +0100 From: Jiri Slaby To: Andrew Morton Cc: werner@suse.de, alan@lxorguk.ukuu.org.uk, gregkh@suse.de, linux-kernel@vger.kernel.org, jirislaby@gmail.com, Kyle McMartin , Helge Deller , "James E.J. Bottomley" , linux-parisc@vger.kernel.org Subject: [PATCH v2 2/5] parisc: cleanup console handling Date: Thu, 4 Nov 2010 16:20:21 +0100 Message-Id: <1288884024-23873-2-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1288884024-23873-1-git-send-email-jslaby@suse.cz> References: <1288884024-23873-1-git-send-email-jslaby@suse.cz> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 04 Nov 2010 15:22:01 +0000 (UTC) diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index 66d1f17..11bdd68 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c @@ -92,8 +92,6 @@ static int pdc_console_setup(struct console *co, char *options) static struct timer_list pdc_console_timer; -extern struct console * console_drivers; - static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp) { @@ -169,11 +167,13 @@ static int __init pdc_console_tty_driver_init(void) * It is unregistered if the pdc console was not selected as the * primary console. */ - struct console *tmp = console_drivers; + struct console *tmp; - for (tmp = console_drivers; tmp; tmp = tmp->next) + acquire_console_sem(); + for_each_console(tmp) if (tmp == &pdc_cons) break; + release_console_sem(); if (!tmp) { printk(KERN_INFO "PDC console driver not registered anymore, not creating %s\n", pdc_cons.name);