aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/pdc_cons.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/pdc_cons.c')
-rw-r--r--arch/parisc/kernel/pdc_cons.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index 66d1f17fdb94..11bdd68e5762 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)
92 92
93static struct timer_list pdc_console_timer; 93static struct timer_list pdc_console_timer;
94 94
95extern struct console * console_drivers;
96
97static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp) 95static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp)
98{ 96{
99 97
@@ -169,11 +167,13 @@ static int __init pdc_console_tty_driver_init(void)
169 * It is unregistered if the pdc console was not selected as the 167 * It is unregistered if the pdc console was not selected as the
170 * primary console. */ 168 * primary console. */
171 169
172 struct console *tmp = console_drivers; 170 struct console *tmp;
173 171
174 for (tmp = console_drivers; tmp; tmp = tmp->next) 172 acquire_console_sem();
173 for_each_console(tmp)
175 if (tmp == &pdc_cons) 174 if (tmp == &pdc_cons)
176 break; 175 break;
176 release_console_sem();
177 177
178 if (!tmp) { 178 if (!tmp) {
179 printk(KERN_INFO "PDC console driver not registered anymore, not creating %s\n", pdc_cons.name); 179 printk(KERN_INFO "PDC console driver not registered anymore, not creating %s\n", pdc_cons.name);