diff options
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 70a09a3d5af0..707c5b03bce9 100644 --- a/drivers/serial/suncore.c +++ b/drivers/serial/suncore.c | |||
@@ -23,11 +23,36 @@ | |||
23 | 23 | ||
24 | #include "suncore.h" | 24 | #include "suncore.h" |
25 | 25 | ||
26 | int sunserial_current_minor = 64; | 26 | static int sunserial_current_minor = 64; |
27 | 27 | ||
28 | EXPORT_SYMBOL(sunserial_current_minor); | 28 | int sunserial_register_minors(struct uart_driver *drv, int count) |
29 | { | ||
30 | int err = 0; | ||
31 | |||
32 | drv->minor = sunserial_current_minor; | ||
33 | drv->nr += count; | ||
34 | /* Register the driver on the first call */ | ||
35 | if (drv->nr == count) | ||
36 | err = uart_register_driver(drv); | ||
37 | if (err == 0) { | ||
38 | sunserial_current_minor += count; | ||
39 | drv->tty_driver->name_base = drv->minor - 64; | ||
40 | } | ||
41 | return err; | ||
42 | } | ||
43 | EXPORT_SYMBOL(sunserial_register_minors); | ||
44 | |||
45 | void sunserial_unregister_minors(struct uart_driver *drv, int count) | ||
46 | { | ||
47 | drv->nr -= count; | ||
48 | sunserial_current_minor -= count; | ||
49 | |||
50 | if (drv->nr == 0) | ||
51 | uart_unregister_driver(drv); | ||
52 | } | ||
53 | EXPORT_SYMBOL(sunserial_unregister_minors); | ||
29 | 54 | ||
30 | int sunserial_console_match(struct console *con, struct device_node *dp, | 55 | int __init sunserial_console_match(struct console *con, struct device_node *dp, |
31 | struct uart_driver *drv, int line) | 56 | struct uart_driver *drv, int line) |
32 | { | 57 | { |
33 | int off; | 58 | int off; |
@@ -133,8 +158,6 @@ sunserial_console_termios(struct console *con) | |||
133 | con->cflag = cflag; | 158 | con->cflag = cflag; |
134 | } | 159 | } |
135 | 160 | ||
136 | EXPORT_SYMBOL(sunserial_console_termios); | ||
137 | |||
138 | /* Sun serial MOUSE auto baud rate detection. */ | 161 | /* Sun serial MOUSE auto baud rate detection. */ |
139 | static struct mouse_baud_cflag { | 162 | static struct mouse_baud_cflag { |
140 | int baud; | 163 | int baud; |