atmel_serial: show tty name in /proc/interrupts
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Fri, 8 Feb 2008 12:21:08 +0000 (04:21 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 8 Feb 2008 17:22:37 +0000 (09:22 -0800)
When possible, pass the tty name to request_irq() so that the user can easily
distinguish the different serial ports in /proc/interrupts.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Tested-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/atmel_serial.c

index 8cea6068f03ed51caa768a78a9c5f7d5a17207c2..fad245b064d666a00017aabcc8f6ccb9b4f08a91 100644 (file)
@@ -793,6 +793,7 @@ static void atmel_tasklet_func(unsigned long data)
 static int atmel_startup(struct uart_port *port)
 {
        struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
 static int atmel_startup(struct uart_port *port)
 {
        struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
+       struct tty_struct *tty = port->info->tty;
        int retval;
 
        /*
        int retval;
 
        /*
@@ -806,7 +807,7 @@ static int atmel_startup(struct uart_port *port)
         * Allocate the IRQ
         */
        retval = request_irq(port->irq, atmel_interrupt, IRQF_SHARED,
         * Allocate the IRQ
         */
        retval = request_irq(port->irq, atmel_interrupt, IRQF_SHARED,
-                       "atmel_serial", port);
+                       tty ? tty->name : "atmel_serial", port);
        if (retval) {
                printk("atmel_serial: atmel_startup - Can't get irq\n");
                return retval;
        if (retval) {
                printk("atmel_serial: atmel_startup - Can't get irq\n");
                return retval;