]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SPARC] serial: Make sure sysfs nodes get named correctly.
authorDavid S. Miller <davem@sunset.davemloft.net>
Mon, 20 Feb 2006 22:39:16 +0000 (14:39 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 20 Mar 2006 09:13:47 +0000 (01:13 -0800)
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>
drivers/serial/sunhv.c
drivers/serial/sunsab.c
drivers/serial/sunsu.c
drivers/serial/sunzilog.c

index 8537839f9abbbb18bec06b416d6ea2991c5b7d7b..f137804b31331e15b8df64d3ff88a3e7d74ee91d 100644 (file)
@@ -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();
index 02f62da546b5f3bf57c541c66f83284a84e3d8a4..a2fb0c2fb121ffde46db6b3c049f7147141303be 100644 (file)
@@ -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;
index 3313cb2a355a168d258018c1519021869f77de74..46510e7f505c371368e3920bd145e89299709b11 100644 (file)
@@ -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();
index 5aa74e7a954e7e7831f3be045076f0d94e4198d0..10b35c6f287daacaf39c7514a436a547caf5dd12 100644 (file)
@@ -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;