diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-02-10 09:44:08 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 18:51:22 (GMT) |
commit | d5c9ffc6c6d15d4f655236e26942a21ad61fe3ad (patch) | |
tree | 0fda7f4a171461ab95bb424f158949d53f223920 /arch/um/include/line.h | |
parent | b4ac91a0eac36f347a509afda07e4305e931de61 (diff) | |
download | linux-fsl-qoriq-d5c9ffc6c6d15d4f655236e26942a21ad61fe3ad.tar.xz |
[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.h | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/arch/um/include/line.h b/arch/um/include/line.h index a2486b4..3477a85 100644 --- a/arch/um/include/line.h +++ b/arch/um/include/line.h @@ -15,19 +15,18 @@ #include "chan_user.h" #include "mconsole_kern.h" +/* There's only one modifiable field in this - .mc.list */ struct line_driver { - char *name; - char *device_name; - short major; - short minor_start; - short type; - short subtype; - int read_irq; - char *read_irq_name; - int write_irq; - char *write_irq_name; - char *symlink_from; - char *symlink_to; + const char *name; + const char *device_name; + const short major; + const short minor_start; + const short type; + const short subtype; + const int read_irq; + const char *read_irq_name; + const int write_irq; + const char *write_irq_name; struct mc_device mc; }; @@ -67,12 +66,6 @@ struct line { .lock = SPIN_LOCK_UNLOCKED, \ .driver = d } -struct lines { - int num; -}; - -#define LINES_INIT(n) { .num = n } - extern void line_close(struct tty_struct *tty, struct file * filp); extern int line_open(struct line *lines, struct tty_struct *tty); extern int line_setup(struct line *lines, unsigned int sizeof_lines, @@ -94,10 +87,9 @@ extern char *add_xterm_umid(char *base); extern int line_setup_irq(int fd, int input, int output, struct line *line, void *data); extern void line_close_chan(struct line *line); -extern struct tty_driver * line_register_devfs(struct lines *set, - struct line_driver *line_driver, - const struct tty_operations *driver, - struct line *lines, int nlines); +extern struct tty_driver *register_lines(struct line_driver *line_driver, + const struct tty_operations *driver, + struct line *lines, int nlines); extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts); extern void close_lines(struct line *lines, int nlines); |