aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/stdio_console.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/stdio_console.c')
-rw-r--r--arch/um/drivers/stdio_console.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c
index 8f3b168a4b6a..b77f7d2ab83b 100644
--- a/arch/um/drivers/stdio_console.c
+++ b/arch/um/drivers/stdio_console.c
@@ -91,18 +91,17 @@ struct line vts[MAX_TTYS] = { LINE_INIT(CONFIG_CON_ZERO_CHAN, &driver),
91 91
92static int con_config(char *str) 92static int con_config(char *str)
93{ 93{
94 return line_config(vts, sizeof(vts)/sizeof(vts[0]), str); 94 return line_config(vts, ARRAY_SIZE(vts), str);
95} 95}
96 96
97static int con_get_config(char *dev, char *str, int size, char **error_out) 97static int con_get_config(char *dev, char *str, int size, char **error_out)
98{ 98{
99 return line_get_config(dev, vts, sizeof(vts)/sizeof(vts[0]), str, 99 return line_get_config(dev, vts, ARRAY_SIZE(vts), str, size, error_out);
100 size, error_out);
101} 100}
102 101
103static int con_remove(int n) 102static int con_remove(int n)
104{ 103{
105 return line_remove(vts, sizeof(vts)/sizeof(vts[0]), n); 104 return line_remove(vts, ARRAY_SIZE(vts), n);
106} 105}
107 106
108static int con_open(struct tty_struct *tty, struct file *filp) 107static int con_open(struct tty_struct *tty, struct file *filp)
@@ -170,7 +169,7 @@ int stdio_init(void)
170 return -1; 169 return -1;
171 printk(KERN_INFO "Initialized stdio console driver\n"); 170 printk(KERN_INFO "Initialized stdio console driver\n");
172 171
173 lines_init(vts, sizeof(vts)/sizeof(vts[0])); 172 lines_init(vts, ARRAY_SIZE(vts));
174 173
175 new_title = add_xterm_umid(opts.xterm_title); 174 new_title = add_xterm_umid(opts.xterm_title);
176 if(new_title != NULL) 175 if(new_title != NULL)
@@ -186,13 +185,13 @@ static void console_exit(void)
186{ 185{
187 if (!con_init_done) 186 if (!con_init_done)
188 return; 187 return;
189 close_lines(vts, sizeof(vts)/sizeof(vts[0])); 188 close_lines(vts, ARRAY_SIZE(vts));
190} 189}
191__uml_exitcall(console_exit); 190__uml_exitcall(console_exit);
192 191
193static int console_chan_setup(char *str) 192static int console_chan_setup(char *str)
194{ 193{
195 return line_setup(vts, sizeof(vts)/sizeof(vts[0]), str, 1); 194 return line_setup(vts, ARRAY_SIZE(vts), str, 1);
196} 195}
197__setup("con", console_chan_setup); 196__setup("con", console_chan_setup);
198__channel_help(console_chan_setup, "con"); 197__channel_help(console_chan_setup, "con");