浏览代码

[SPARC] serial: Make sure sysfs nodes get named correctly.

Because we play this trick where we use ttyS? in increasing minor
numbers for different sunfoo.c drivers, we have to inform the TTY
layer of this.

Do so by setting the tty->name_base appropriately.

Probably there should be a generic way to do this in the serial core,
but for now...

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 19 年之前
父节点
当前提交
f5deb807b8
共有 4 个文件被更改,包括 6 次插入0 次删除
  1. 1 0
      drivers/serial/sunhv.c
  2. 2 0
      drivers/serial/sunsab.c
  3. 2 0
      drivers/serial/sunsu.c
  4. 1 0
      drivers/serial/sunzilog.c

+ 1 - 0
drivers/serial/sunhv.c

@@ -494,6 +494,7 @@ static int __init sunhv_init(void)
 		return ret;
 		return ret;
 	}
 	}
 
 
+	sunhv_reg.tty_driver->name_base = sunhv_reg.minor - 64;
 	sunserial_current_minor += 1;
 	sunserial_current_minor += 1;
 
 
 	sunhv_reg.cons = SUNHV_CONSOLE();
 	sunhv_reg.cons = SUNHV_CONSOLE();

+ 2 - 0
drivers/serial/sunsab.c

@@ -1142,6 +1142,8 @@ static int __init sunsab_init(void)
 		return ret;
 		return ret;
 	}
 	}
 
 
+	sunsab_reg.tty_driver->name_base = sunsab_reg.minor - 64;
+
 	sunsab_reg.cons = SUNSAB_CONSOLE();
 	sunsab_reg.cons = SUNSAB_CONSOLE();
 
 
 	sunserial_current_minor += num_channels;
 	sunserial_current_minor += num_channels;

+ 2 - 0
drivers/serial/sunsu.c

@@ -1529,6 +1529,8 @@ static int __init sunsu_serial_init(void)
 	if (ret < 0)
 	if (ret < 0)
 		return ret;
 		return ret;
 
 
+	sunsu_reg.tty_driver->name_base = sunsu_reg.minor - 64;
+
 	sunserial_current_minor += instance;
 	sunserial_current_minor += instance;
 
 
 	sunsu_reg.cons = SUNSU_CONSOLE();
 	sunsu_reg.cons = SUNSU_CONSOLE();

+ 1 - 0
drivers/serial/sunzilog.c

@@ -1692,6 +1692,7 @@ static int __init sunzilog_ports_init(void)
 
 
 	ret = uart_register_driver(&sunzilog_reg);
 	ret = uart_register_driver(&sunzilog_reg);
 	if (ret == 0) {
 	if (ret == 0) {
+		sunzilog_reg.tty_driver->name_base = sunzilog_reg.minor - 64;
 		sunzilog_reg.cons = SUNZILOG_CONSOLE();
 		sunzilog_reg.cons = SUNZILOG_CONSOLE();
 
 
 		sunserial_current_minor += uart_count;
 		sunserial_current_minor += uart_count;