aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include/line.h
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-02-10 04:44:08 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:22 -0500
commitd5c9ffc6c6d15d4f655236e26942a21ad61fe3ad (patch)
tree0fda7f4a171461ab95bb424f158949d53f223920 /arch/um/include/line.h
parentb4ac91a0eac36f347a509afda07e4305e931de61 (diff)
[PATCH] uml: console locking commentary and code cleanup
Remove the last vestiges of devfs from console registration. Change the name of the function, plus remove a couple of unused fields from the line_driver structure. struct lines is no longer needed, all traces of it are gone. The only way that I can see to mark a structure as being almost-const is to individually const the fields. This is the case for the line_driver structure, which has only one modifiable field - a list_head in a sub-structure. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/include/line.h')
-rw-r--r--arch/um/include/line.h36
1 files changed, 14 insertions, 22 deletions
diff --git a/arch/um/include/line.h b/arch/um/include/line.h
index a2486b4cc9fe..3477a858eaa9 100644
--- a/arch/um/include/line.h
+++ b/arch/um/include/line.h
@@ -15,19 +15,18 @@
15#include "chan_user.h" 15#include "chan_user.h"
16#include "mconsole_kern.h" 16#include "mconsole_kern.h"
17 17
18/* There's only one modifiable field in this - .mc.list */
18struct line_driver { 19struct line_driver {
19 char *name; 20 const char *name;
20 char *device_name; 21 const char *device_name;
21 short major; 22 const short major;
22 short minor_start; 23 const short minor_start;
23 short type; 24 const short type;
24 short subtype; 25 const short subtype;
25 int read_irq; 26 const int read_irq;
26 char *read_irq_name; 27 const char *read_irq_name;
27 int write_irq; 28 const int write_irq;
28 char *write_irq_name; 29 const char *write_irq_name;
29 char *symlink_from;
30 char *symlink_to;
31 struct mc_device mc; 30 struct mc_device mc;
32}; 31};
33 32
@@ -67,12 +66,6 @@ struct line {
67 .lock = SPIN_LOCK_UNLOCKED, \ 66 .lock = SPIN_LOCK_UNLOCKED, \
68 .driver = d } 67 .driver = d }
69 68
70struct lines {
71 int num;
72};
73
74#define LINES_INIT(n) { .num = n }
75
76extern void line_close(struct tty_struct *tty, struct file * filp); 69extern void line_close(struct tty_struct *tty, struct file * filp);
77extern int line_open(struct line *lines, struct tty_struct *tty); 70extern int line_open(struct line *lines, struct tty_struct *tty);
78extern int line_setup(struct line *lines, unsigned int sizeof_lines, 71extern int line_setup(struct line *lines, unsigned int sizeof_lines,
@@ -94,10 +87,9 @@ extern char *add_xterm_umid(char *base);
94extern int line_setup_irq(int fd, int input, int output, struct line *line, 87extern int line_setup_irq(int fd, int input, int output, struct line *line,
95 void *data); 88 void *data);
96extern void line_close_chan(struct line *line); 89extern void line_close_chan(struct line *line);
97extern struct tty_driver * line_register_devfs(struct lines *set, 90extern struct tty_driver *register_lines(struct line_driver *line_driver,
98 struct line_driver *line_driver, 91 const struct tty_operations *driver,
99 const struct tty_operations *driver, 92 struct line *lines, int nlines);
100 struct line *lines, int nlines);
101extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts); 93extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts);
102extern void close_lines(struct line *lines, int nlines); 94extern void close_lines(struct line *lines, int nlines);
103 95