mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] serial_ns16550: change the driver's name
@ 2012-07-20  5:46 Antony Pavlov
  2012-07-20  8:02 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Antony Pavlov @ 2012-07-20  5:46 UTC (permalink / raw)
  To: barebox

The name "serial_ns16550" is not handy because the devices
will have the names like "serial_ns165500", "serial_ns165501",
"serial_ns165502" etc.

The names like "ns16550_serial0" and "ns16550_serial1" look
much better.

Also it is reasonable to make serial driver's names unification.
E.g. see the names for drivers in drivers/serial directory:
 "netx_serial",
 "mpc5xxx_serial",
 "altera_serial",
 "s3c_serial",
 "imx_serial",
 "pxa_serial",
 "blackfin_serial",
 "stm_serial",
 "pl010_serial",
and even "g_serial" in ./drivers/usb/gadget/serial.c

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/serial/serial_ns16550.c |    2 +-
 include/driver.h                |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 820aac5..1248bd6 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -263,7 +263,7 @@ static int ns16550_probe(struct device_d *dev)
  * @brief Driver registration structure
  */
 static struct driver_d ns16550_serial_driver = {
-	.name = "serial_ns16550",
+	.name = "ns16550_serial",
 	.probe = ns16550_probe,
 };
 
diff --git a/include/driver.h b/include/driver.h
index 7d597b4..0a8dc8e 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -226,7 +226,7 @@ struct NS16550_plat;
 static inline struct device_d *add_ns16550_device(int id, resource_size_t start,
 		resource_size_t size, int flags, struct NS16550_plat *pdata)
 {
-	return add_generic_device("serial_ns16550", id, NULL, start, size,
+	return add_generic_device("ns16550_serial", id, NULL, start, size,
 				  IORESOURCE_MEM | flags, pdata);
 }
 
-- 
1.7.10


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] serial_ns16550: change the driver's name
  2012-07-20  5:46 [PATCH] serial_ns16550: change the driver's name Antony Pavlov
@ 2012-07-20  8:02 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-07-20  8:02 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

On Fri, Jul 20, 2012 at 09:46:49AM +0400, Antony Pavlov wrote:
> The name "serial_ns16550" is not handy because the devices
> will have the names like "serial_ns165500", "serial_ns165501",
> "serial_ns165502" etc.
> 
> The names like "ns16550_serial0" and "ns16550_serial1" look
> much better.
> 
> Also it is reasonable to make serial driver's names unification.
> E.g. see the names for drivers in drivers/serial directory:
>  "netx_serial",
>  "mpc5xxx_serial",
>  "altera_serial",
>  "s3c_serial",
>  "imx_serial",
>  "pxa_serial",
>  "blackfin_serial",
>  "stm_serial",
>  "pl010_serial",
> and even "g_serial" in ./drivers/usb/gadget/serial.c

Good idea. Applied.

Sascha

> 
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
>  drivers/serial/serial_ns16550.c |    2 +-
>  include/driver.h                |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
> index 820aac5..1248bd6 100644
> --- a/drivers/serial/serial_ns16550.c
> +++ b/drivers/serial/serial_ns16550.c
> @@ -263,7 +263,7 @@ static int ns16550_probe(struct device_d *dev)
>   * @brief Driver registration structure
>   */
>  static struct driver_d ns16550_serial_driver = {
> -	.name = "serial_ns16550",
> +	.name = "ns16550_serial",
>  	.probe = ns16550_probe,
>  };
>  
> diff --git a/include/driver.h b/include/driver.h
> index 7d597b4..0a8dc8e 100644
> --- a/include/driver.h
> +++ b/include/driver.h
> @@ -226,7 +226,7 @@ struct NS16550_plat;
>  static inline struct device_d *add_ns16550_device(int id, resource_size_t start,
>  		resource_size_t size, int flags, struct NS16550_plat *pdata)
>  {
> -	return add_generic_device("serial_ns16550", id, NULL, start, size,
> +	return add_generic_device("ns16550_serial", id, NULL, start, size,
>  				  IORESOURCE_MEM | flags, pdata);
>  }
>  
> -- 
> 1.7.10
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2012-07-20  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20  5:46 [PATCH] serial_ns16550: change the driver's name Antony Pavlov
2012-07-20  8:02 ` Sascha Hauer

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