Skip to content

Commit

Permalink
[SPARC] serial: Make sure sysfs nodes get named correctly.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Mar 20, 2006
1 parent 5555563 commit f5deb80
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/serial/sunhv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions drivers/serial/sunsab.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions drivers/serial/sunsu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions drivers/serial/sunzilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f5deb80

Please sign in to comment.