summaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-07 14:39:20 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-07 14:39:20 -0800
commit56b85f32d530d09d6805488ad00775d4e0e3baab (patch)
treee7fbe69e338ef775d3b2dd822aa915d259b4bc94 /arch/parisc
parent3e5b08cbbf78bedd316904ab0cf3b27119433ee5 (diff)
parent568389c257fa7d74ce36c2f78bad31965fded4cf (diff)
downloadop-kernel-dev-56b85f32d530d09d6805488ad00775d4e0e3baab.zip
op-kernel-dev-56b85f32d530d09d6805488ad00775d4e0e3baab.tar.gz
Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (36 commits) serial: apbuart: Fixup apbuart_console_init() TTY: Add tty ioctl to figure device node of the system console. tty: add 'active' sysfs attribute to tty0 and console device drivers: serial: apbuart: Handle OF failures gracefully Serial: Avoid unbalanced IRQ wake disable during resume tty: fix typos/errors in tty_driver.h comments pch_uart : fix warnings for 64bit compile 8250: fix uninitialized FIFOs ip2: fix compiler warning on ip2main_pci_tbl specialix: fix compiler warning on specialix_pci_tbl rocket: fix compiler warning on rocket_pci_ids 8250: add a UPIO_DWAPB32 for 32 bit accesses 8250: use container_of() instead of casting serial: omap-serial: Add support for kernel debugger serial: fix pch_uart kconfig & build drivers: char: hvc: add arm JTAG DCC console support RS485 documentation: add 16C950 UART description serial: ifx6x60: fix memory leak serial: ifx6x60: free IRQ on error Serial: EG20T: add PCH_UART driver ... Fixed up conflicts in drivers/serial/apbuart.c with evil merge that makes the code look fairly sane (unlike either side).
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/include/asm/ioctls.h1
-rw-r--r--arch/parisc/kernel/pdc_cons.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/arch/parisc/include/asm/ioctls.h b/arch/parisc/include/asm/ioctls.h
index 4e06144..6ba80d0 100644
--- a/arch/parisc/include/asm/ioctls.h
+++ b/arch/parisc/include/asm/ioctls.h
@@ -52,6 +52,7 @@
#define TCSETSF2 _IOW('T',0x2D, struct termios2)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
+#define TIOCGDEV _IOR('T',0x32, int) /* Get primary device node of /dev/console */
#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
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);
OpenPOWER on IntegriCloud