From patchwork Thu Jan 6 22:23:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 461311 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 p06MUnjT012283 for ; Thu, 6 Jan 2011 22:30:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754772Ab1AFW3c (ORCPT ); Thu, 6 Jan 2011 17:29:32 -0500 Received: from kroah.org ([198.145.64.141]:55644 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754469Ab1AFWXm (ORCPT ); Thu, 6 Jan 2011 17:23:42 -0500 Received: from localhost (c-71-227-141-191.hsd1.wa.comcast.net [71.227.141.191]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coco.kroah.org (Postfix) with ESMTPSA id B1F2D48887; Thu, 6 Jan 2011 14:23:41 -0800 (PST) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Jiri Slaby , Helge Deller , "James E.J. Bottomley" , linux-parisc@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH 12/36] parisc: cleanup console handling Date: Thu, 6 Jan 2011 14:23:01 -0800 Message-Id: <1294352605-31906-12-git-send-email-gregkh@suse.de> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <20110106215404.GA30624@kroah.com> References: <20110106215404.GA30624@kroah.com> 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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 06 Jan 2011 22:31:09 +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);