提交 597c606f 编写于 作者: J Jiri Slaby 提交者: Greg Kroah-Hartman

parisc: cleanup console handling

* use newly added for_each_console for iterating consoles
* add proper console locking
* do not initialize tmp twice
* no need to declare console_drivers, it's already done in console.h
Signed-off-by: NJiri Slaby <jslaby@suse.cz>
Acked-by: NKyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 23308ba5
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册