diff mbox series

serial: altera_jtaguart: Use device name when requesting IRQ

Message ID 20241203132556.14182-1-tklauser@distanz.ch
State New
Headers show
Series serial: altera_jtaguart: Use device name when requesting IRQ | expand

Commit Message

Tobias Klauser Dec. 3, 2024, 1:25 p.m. UTC
The request_irq name parameter should be the device name, not the driver
name. This leads to more informative information in /proc/interrupts.

Before this patch:

$ cat /proc/interrupts
...
40:        123          0     GIC-0  72 Level     altera_jtaguart

After this patch:

$ cat /proc/interrupts
...
40:          6          0     GIC-0  72 Level     ff200100.fpga-juart0

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/tty/serial/altera_jtaguart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tobias Klauser Dec. 3, 2024, 2:02 p.m. UTC | #1
On 2024-12-03 at 14:25:56 +0100, Tobias Klauser <tklauser@distanz.ch> wrote:
> The request_irq name parameter should be the device name, not the driver
> name. This leads to more informative information in /proc/interrupts.
> 
> Before this patch:
> 
> $ cat /proc/interrupts
> ...
> 40:        123          0     GIC-0  72 Level     altera_jtaguart
> 
> After this patch:
> 
> $ cat /proc/interrupts
> ...
> 40:          6          0     GIC-0  72 Level     ff200100.fpga-juart0
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---

Apologies, I meant to send this patch before the patch titled "[PATCH v2]
serial: altera_jtaguart: Use KBUILD_MODNAME" [1]. It should be applied
before that one, otherwise the driver will fail to build with just that
patch applied.

[1] https://lore.kernel.org/linux-serial/20241203131727.9078-1-tklauser@distanz.ch/
diff mbox series

Patch

diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index a9dd083d45d1..d47a62d1c9f7 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -171,7 +171,7 @@  static int altera_jtaguart_startup(struct uart_port *port)
 	int ret;
 
 	ret = request_irq(port->irq, altera_jtaguart_interrupt, 0,
-			DRV_NAME, port);
+			dev_name(port->dev), port);
 	if (ret) {
 		dev_err(port->dev, "unable to attach Altera JTAG UART %d interrupt vector=%d\n",
 			port->line, port->irq);