Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH] serial: altera_jtaguart: Use DRV_NAME to initialize uart_driver.driver_name
@ 2024-12-03 12:56 Tobias Klauser
  2024-12-03 13:03 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Klauser @ 2024-12-03 12:56 UTC (permalink / raw)
  To: linux-serial; +Cc: Greg Kroah-Hartman, Jiri Slaby

Use the DRV_NAME constant instead of the verbatim string.

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

diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index b9c3c3bed0c1..9657c3bb8e66 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -365,7 +365,7 @@ OF_EARLYCON_DECLARE(juart, "altr,juart-1.0", altera_jtaguart_earlycon_setup);
 
 static struct uart_driver altera_jtaguart_driver = {
 	.owner		= THIS_MODULE,
-	.driver_name	= "altera_jtaguart",
+	.driver_name	= DRV_NAME,
 	.dev_name	= "ttyJ",
 	.major		= ALTERA_JTAGUART_MAJOR,
 	.minor		= ALTERA_JTAGUART_MINOR,
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: altera_jtaguart: Use DRV_NAME to initialize uart_driver.driver_name
  2024-12-03 12:56 [PATCH] serial: altera_jtaguart: Use DRV_NAME to initialize uart_driver.driver_name Tobias Klauser
@ 2024-12-03 13:03 ` Greg Kroah-Hartman
  2024-12-03 13:14   ` Tobias Klauser
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-12-03 13:03 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: linux-serial, Jiri Slaby

On Tue, Dec 03, 2024 at 01:56:54PM +0100, Tobias Klauser wrote:
> Use the DRV_NAME constant instead of the verbatim string.

Why?

> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>  drivers/tty/serial/altera_jtaguart.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
> index b9c3c3bed0c1..9657c3bb8e66 100644
> --- a/drivers/tty/serial/altera_jtaguart.c
> +++ b/drivers/tty/serial/altera_jtaguart.c
> @@ -365,7 +365,7 @@ OF_EARLYCON_DECLARE(juart, "altr,juart-1.0", altera_jtaguart_earlycon_setup);
>  
>  static struct uart_driver altera_jtaguart_driver = {
>  	.owner		= THIS_MODULE,
> -	.driver_name	= "altera_jtaguart",
> +	.driver_name	= DRV_NAME,

Why don't we just use KBUILD_MODNAME here and get rid of DRV_NAME
entirely?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: altera_jtaguart: Use DRV_NAME to initialize uart_driver.driver_name
  2024-12-03 13:03 ` Greg Kroah-Hartman
@ 2024-12-03 13:14   ` Tobias Klauser
  0 siblings, 0 replies; 3+ messages in thread
From: Tobias Klauser @ 2024-12-03 13:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-serial, Jiri Slaby

On 2024-12-03 at 14:03:03 +0100, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> On Tue, Dec 03, 2024 at 01:56:54PM +0100, Tobias Klauser wrote:
> > Use the DRV_NAME constant instead of the verbatim string.
> 
> Why?
> 
> > 
> > Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> > ---
> >  drivers/tty/serial/altera_jtaguart.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
> > index b9c3c3bed0c1..9657c3bb8e66 100644
> > --- a/drivers/tty/serial/altera_jtaguart.c
> > +++ b/drivers/tty/serial/altera_jtaguart.c
> > @@ -365,7 +365,7 @@ OF_EARLYCON_DECLARE(juart, "altr,juart-1.0", altera_jtaguart_earlycon_setup);
> >  
> >  static struct uart_driver altera_jtaguart_driver = {
> >  	.owner		= THIS_MODULE,
> > -	.driver_name	= "altera_jtaguart",
> > +	.driver_name	= DRV_NAME,
> 
> Why don't we just use KBUILD_MODNAME here and get rid of DRV_NAME
> entirely?

Thanks, I didn't know about KBUILD_MODNAME. Sent a new patch to get rid
of DRV_NAME.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-03 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03 12:56 [PATCH] serial: altera_jtaguart: Use DRV_NAME to initialize uart_driver.driver_name Tobias Klauser
2024-12-03 13:03 ` Greg Kroah-Hartman
2024-12-03 13:14   ` Tobias Klauser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox