diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-12 09:52:12 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-12 09:52:12 -0800 |
commit | da8cadb31b82c9d41fc593c8deab6aa20b162d6b (patch) | |
tree | 5640a34aa485f254de503a17833046645ade47f6 /drivers/serial/suncore.c | |
parent | 02ec96be2b45d9f2712687ad107038ef390b24c2 (diff) | |
parent | 0de56d1ab83323d604d95ca193dcbd28388dbabb (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Fix endless loop in cheetah_xcall_deliver().
[SERIAL] sparc: Infrastructure to fix section mismatch bugs.
Diffstat (limited to 'drivers/serial/suncore.c')
-rw-r--r-- | drivers/serial/suncore.c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c index 70a09a3d5af..707c5b03bce 100644 --- a/drivers/serial/suncore.c +++ b/drivers/serial/suncore.c @@ -23,11 +23,36 @@ #include "suncore.h" -int sunserial_current_minor = 64; +static int sunserial_current_minor = 64; -EXPORT_SYMBOL(sunserial_current_minor); +int sunserial_register_minors(struct uart_driver *drv, int count) +{ + int err = 0; + + drv->minor = sunserial_current_minor; + drv->nr += count; + /* Register the driver on the first call */ + if (drv->nr == count) + err = uart_register_driver(drv); + if (err == 0) { + sunserial_current_minor += count; + drv->tty_driver->name_base = drv->minor - 64; + } + return err; +} +EXPORT_SYMBOL(sunserial_register_minors); + +void sunserial_unregister_minors(struct uart_driver *drv, int count) +{ + drv->nr -= count; + sunserial_current_minor -= count; + + if (drv->nr == 0) + uart_unregister_driver(drv); +} +EXPORT_SYMBOL(sunserial_unregister_minors); -int sunserial_console_match(struct console *con, struct device_node *dp, +int __init sunserial_console_match(struct console *con, struct device_node *dp, struct uart_driver *drv, int line) { int off; @@ -133,8 +158,6 @@ sunserial_console_termios(struct console *con) con->cflag = cflag; } -EXPORT_SYMBOL(sunserial_console_termios); - /* Sun serial MOUSE auto baud rate detection. */ static struct mouse_baud_cflag { int baud; |