Skip to contentSkip to conversation

fix driver_name conflicts

PATCH In review Anton Vorontsov 4 participants 4 messages May 26, 2008 – May 28, 2008 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix driver_name conflicts

Some drivers are using too generic "serial" name for driver_name, this might cause issues, like this:

Freescale QUICC Engine UART device driver
proc_dir_entry 'serial' already registered

Call Trace:
[cf82de50] [c0007f7c] show_stack+0x4c/0x1ac (unreliable)
[cf82de90] [c00b03fc] proc_register+0xfc/0x1ac
[cf82dec0] [c00b05c8] create_proc_entry+0x60/0xac
[cf82dee0] [c00b23dc] proc_tty_register_driver+0x60/0x98
[cf82def0] [c016dbd8] tty_register_driver+0x1b4/0x228
[cf82df20] [c0184d70] uart_register_driver+0x144/0x194
[cf82df40] [c030a378] ucc_uart_init+0x2c/0x94
[cf82df50] [c02f21a0] kernel_init+0x98/0x27c
[cf82dff0] [c000fa74] kernel_thread+0x44/0x60

^^ The board is using ucc_uart.c and 8250.c, both registered as
"serial".

This patch fixes two drivers that are using "serial" for driver_name and not "ttyS" for dev_name. Drivers that are using "ttyS" for dev_name, will conflict anyway, so we don't bother with these.

---
 drivers/serial/sb1250-duart.c |    2 +-
 drivers/serial/ucc_uart.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/serial/sb1250-duart.c +1 -1
index 2d6c08b..f8e1447 100644
@@ -924,7 +924,7 @@ console_initcall(sbd_serial_console_init);
 
 static struct uart_driver sbd_reg = {
 	.owner		= THIS_MODULE,
-	.driver_name	= "serial",
+	.driver_name	= "sb1250_duart",
 	.dev_name	= "duart",
 	.major		= TTY_MAJOR,
 	.minor		= SB1250_DUART_MINOR_BASE,
drivers/serial/ucc_uart.c +1 -1
index 01917c4..566a8b4 100644
@@ -195,7 +195,7 @@ struct uart_qe_port {
 
 static struct uart_driver ucc_uart_driver = {
 	.owner  	= THIS_MODULE,
-	.driver_name    = "serial",
+	.driver_name    = "ucc_uart",
 	.dev_name       = "ttyQE",
 	.major  	= SERIAL_QE_MAJOR,
 	.minor  	= SERIAL_QE_MINOR,
Signature · 1 line
1.5.5.1
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · On Mon, 26 May 2008 21:23:40 +0400 Anton Vorontsov <[email protected]>…

Some drivers are using too generic "serial" name for driver_name, this might cause issues, like this:

Freescale QUICC Engine UART device driver
proc_dir_entry 'serial' already registered

Call Trace:
[cf82de50] [c0007f7c] show_stack+0x4c/0x1ac (unreliable)
[cf82de90] [c00b03fc] proc_register+0xfc/0x1ac
[cf82dec0] [c00b05c8] create_proc_entry+0x60/0xac
[cf82dee0] [c00b23dc] proc_tty_register_driver+0x60/0x98
[cf82def0] [c016dbd8] tty_register_driver+0x1b4/0x228
[cf82df20] [c0184d70] uart_register_driver+0x144/0x194
[cf82df40] [c030a378] ucc_uart_init+0x2c/0x94
[cf82df50] [c02f21a0] kernel_init+0x98/0x27c
[cf82dff0] [c000fa74] kernel_thread+0x44/0x60
Quoted 6 lines

^^ The board is using ucc_uart.c and 8250.c, both registered as
"serial".

This patch fixes two drivers that are using "serial" for driver_name and not "ttyS" for dev_name. Drivers that are using "ttyS" for dev_name, will conflict anyway, so we don't bother with these.

Acked-by on v1 1/1
#3 lore raw
In reply to Anton Vorontsov
Quoted 9 lines · Anton Vorontsov

This patch fixes two drivers that are using "serial" for driver_name and not "ttyS" for dev_name. Drivers that are using "ttyS" for dev_name, will conflict anyway, so we don't bother with these.

---
 drivers/serial/sb1250-duart.c |    2 +-
 drivers/serial/ucc_uart.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Not that it makes much sense to have both included in the same kernel,
but for the purpose of purity:

Maciej