aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-09-27 04:50:33 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 11:26:15 -0400
commit5e7672ec3f059f764fcc5c78216e24bb16c44dba (patch)
treeea0e36468e19fbc3c9ff79d6378b5d8e7eef8ea3 /arch/um/include
parent48af05ed54ddf8dc6eceea4f009e063d7e784b37 (diff)
[PATCH] uml: const more data
Make lots of structures const in order to make it obvious that they need no locking. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/include')
-rw-r--r--arch/um/include/chan_kern.h6
-rw-r--r--arch/um/include/chan_user.h6
-rw-r--r--arch/um/include/kern_util.h2
-rw-r--r--arch/um/include/line.h4
-rw-r--r--arch/um/include/net_kern.h4
5 files changed, 11 insertions, 11 deletions
diff --git a/arch/um/include/chan_kern.h b/arch/um/include/chan_kern.h
index 1bb5e9d94270..572d286ed2c6 100644
--- a/arch/um/include/chan_kern.h
+++ b/arch/um/include/chan_kern.h
@@ -23,21 +23,21 @@ struct chan {
23 unsigned int opened:1; 23 unsigned int opened:1;
24 unsigned int enabled:1; 24 unsigned int enabled:1;
25 int fd; 25 int fd;
26 struct chan_ops *ops; 26 const struct chan_ops *ops;
27 void *data; 27 void *data;
28}; 28};
29 29
30extern void chan_interrupt(struct list_head *chans, struct work_struct *task, 30extern void chan_interrupt(struct list_head *chans, struct work_struct *task,
31 struct tty_struct *tty, int irq); 31 struct tty_struct *tty, int irq);
32extern int parse_chan_pair(char *str, struct line *line, int device, 32extern int parse_chan_pair(char *str, struct line *line, int device,
33 struct chan_opts *opts); 33 const struct chan_opts *opts);
34extern int open_chan(struct list_head *chans); 34extern int open_chan(struct list_head *chans);
35extern int write_chan(struct list_head *chans, const char *buf, int len, 35extern int write_chan(struct list_head *chans, const char *buf, int len,
36 int write_irq); 36 int write_irq);
37extern int console_write_chan(struct list_head *chans, const char *buf, 37extern int console_write_chan(struct list_head *chans, const char *buf,
38 int len); 38 int len);
39extern int console_open_chan(struct line *line, struct console *co, 39extern int console_open_chan(struct line *line, struct console *co,
40 struct chan_opts *opts); 40 const struct chan_opts *opts);
41extern void deactivate_chan(struct list_head *chans, int irq); 41extern void deactivate_chan(struct list_head *chans, int irq);
42extern void reactivate_chan(struct list_head *chans, int irq); 42extern void reactivate_chan(struct list_head *chans, int irq);
43extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty); 43extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty);
diff --git a/arch/um/include/chan_user.h b/arch/um/include/chan_user.h
index 659bb3cac32f..a795547a1dbd 100644
--- a/arch/um/include/chan_user.h
+++ b/arch/um/include/chan_user.h
@@ -20,7 +20,7 @@ enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE };
20 20
21struct chan_ops { 21struct chan_ops {
22 char *type; 22 char *type;
23 void *(*init)(char *, int, struct chan_opts *); 23 void *(*init)(char *, int, const struct chan_opts *);
24 int (*open)(int, int, int, void *, char **); 24 int (*open)(int, int, int, void *, char **);
25 void (*close)(int, void *); 25 void (*close)(int, void *);
26 int (*read)(int, char *, void *); 26 int (*read)(int, char *, void *);
@@ -31,8 +31,8 @@ struct chan_ops {
31 int winch; 31 int winch;
32}; 32};
33 33
34extern struct chan_ops fd_ops, null_ops, port_ops, pts_ops, pty_ops, tty_ops, 34extern const struct chan_ops fd_ops, null_ops, port_ops, pts_ops, pty_ops,
35 xterm_ops; 35 tty_ops, xterm_ops;
36 36
37extern void generic_close(int fd, void *unused); 37extern void generic_close(int fd, void *unused);
38extern int generic_read(int fd, char *c_out, void *unused); 38extern int generic_read(int fd, char *c_out, void *unused);
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h
index 89e1dc835a5b..59cfa9e0cad0 100644
--- a/arch/um/include/kern_util.h
+++ b/arch/um/include/kern_util.h
@@ -21,7 +21,7 @@ struct kern_handlers {
21 kern_hndl timer_handler; 21 kern_hndl timer_handler;
22}; 22};
23 23
24extern struct kern_handlers handlinfo_kern; 24extern const struct kern_handlers handlinfo_kern;
25 25
26extern int ncpus; 26extern int ncpus;
27extern char *linux_prog; 27extern char *linux_prog;
diff --git a/arch/um/include/line.h b/arch/um/include/line.h
index 27bf2f6fbc05..642c9a0320f9 100644
--- a/arch/um/include/line.h
+++ b/arch/um/include/line.h
@@ -52,7 +52,7 @@ struct line {
52 52
53 int sigio; 53 int sigio;
54 struct work_struct task; 54 struct work_struct task;
55 struct line_driver *driver; 55 const struct line_driver *driver;
56 int have_irq; 56 int have_irq;
57}; 57};
58 58
@@ -99,7 +99,7 @@ extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts);
99extern void close_lines(struct line *lines, int nlines); 99extern void close_lines(struct line *lines, int nlines);
100 100
101extern int line_config(struct line *lines, unsigned int sizeof_lines, 101extern int line_config(struct line *lines, unsigned int sizeof_lines,
102 char *str, struct chan_opts *opts); 102 char *str, const struct chan_opts *opts);
103extern int line_id(char **str, int *start_out, int *end_out); 103extern int line_id(char **str, int *start_out, int *end_out);
104extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n); 104extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n);
105extern int line_get_config(char *dev, struct line *lines, 105extern int line_get_config(char *dev, struct line *lines,
diff --git a/arch/um/include/net_kern.h b/arch/um/include/net_kern.h
index f7de6df60dd7..769fba43ee03 100644
--- a/arch/um/include/net_kern.h
+++ b/arch/um/include/net_kern.h
@@ -54,8 +54,8 @@ struct transport {
54 struct list_head list; 54 struct list_head list;
55 char *name; 55 char *name;
56 int (*setup)(char *, char **, void *); 56 int (*setup)(char *, char **, void *);
57 struct net_user_info *user; 57 const struct net_user_info *user;
58 struct net_kern_info *kern; 58 const struct net_kern_info *kern;
59 int private_size; 59 int private_size;
60 int setup_size; 60 int setup_size;
61}; 61};