From: David S. Miller Date: Mon, 20 Feb 2006 22:39:16 +0000 (-0800) Subject: [SPARC] serial: Make sure sysfs nodes get named correctly. X-Git-Tag: tegra-9.12.3~22803^2~57 X-Git-Url: https://nv-tegra.nvidia.com/r/gitweb?p=linux-2.6.git;a=commitdiff_plain;h=f5deb807b8cd5c8fe48cbb4f7f5dd70cfbdb1178 [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 --- diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index 8537839f9ab..f137804b313 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c @@ -494,6 +494,7 @@ static int __init sunhv_init(void) return ret; } + sunhv_reg.tty_driver->name_base = sunhv_reg.minor - 64; sunserial_current_minor += 1; sunhv_reg.cons = SUNHV_CONSOLE(); diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 02f62da546b..a2fb0c2fb12 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c @@ -1142,6 +1142,8 @@ static int __init sunsab_init(void) return ret; } + sunsab_reg.tty_driver->name_base = sunsab_reg.minor - 64; + sunsab_reg.cons = SUNSAB_CONSOLE(); sunserial_current_minor += num_channels; diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 3313cb2a355..46510e7f505 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c @@ -1529,6 +1529,8 @@ static int __init sunsu_serial_init(void) if (ret < 0) return ret; + sunsu_reg.tty_driver->name_base = sunsu_reg.minor - 64; + sunserial_current_minor += instance; sunsu_reg.cons = SUNSU_CONSOLE(); diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 5aa74e7a954..10b35c6f287 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c @@ -1692,6 +1692,7 @@ static int __init sunzilog_ports_init(void) ret = uart_register_driver(&sunzilog_reg); if (ret == 0) { + sunzilog_reg.tty_driver->name_base = sunzilog_reg.minor - 64; sunzilog_reg.cons = SUNZILOG_CONSOLE(); sunserial_current_minor += uart_count;