Commit ae161068 authored by Haavard Skinnemoen's avatar Haavard Skinnemoen Committed by Linus Torvalds

atmel_serial: show tty name in /proc/interrupts

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: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Tested-by: default avatarMarc Pignat <marc.pignat@hevs.ch>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c811ab8c
...@@ -793,6 +793,7 @@ static void atmel_tasklet_func(unsigned long data) ...@@ -793,6 +793,7 @@ static void atmel_tasklet_func(unsigned long data)
static int atmel_startup(struct uart_port *port) static int atmel_startup(struct uart_port *port)
{ {
struct atmel_uart_port *atmel_port = to_atmel_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) ...@@ -806,7 +807,7 @@ static int atmel_startup(struct uart_port *port)
* Allocate the IRQ * Allocate the IRQ
*/ */
retval = request_irq(port->irq, atmel_interrupt, IRQF_SHARED, retval = request_irq(port->irq, atmel_interrupt, IRQF_SHARED,
"atmel_serial", port); tty ? tty->name : "atmel_serial", port);
if (retval) { if (retval) {
printk("atmel_serial: atmel_startup - Can't get irq\n"); printk("atmel_serial: atmel_startup - Can't get irq\n");
return retval; return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment