aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
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/drivers
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/drivers')
-rw-r--r--arch/um/drivers/chan_kern.c16
-rw-r--r--arch/um/drivers/daemon.h2
-rw-r--r--arch/um/drivers/daemon_kern.c2
-rw-r--r--arch/um/drivers/daemon_user.c2
-rw-r--r--arch/um/drivers/fd.c4
-rw-r--r--arch/um/drivers/hostaudio_kern.c4
-rw-r--r--arch/um/drivers/line.c6
-rw-r--r--arch/um/drivers/mcast.h2
-rw-r--r--arch/um/drivers/mcast_kern.c2
-rw-r--r--arch/um/drivers/mcast_user.c2
-rw-r--r--arch/um/drivers/mmapper_kern.c4
-rw-r--r--arch/um/drivers/null.c4
-rw-r--r--arch/um/drivers/pcap_kern.c2
-rw-r--r--arch/um/drivers/pcap_user.c2
-rw-r--r--arch/um/drivers/port_user.c4
-rw-r--r--arch/um/drivers/pty.c6
-rw-r--r--arch/um/drivers/random.c2
-rw-r--r--arch/um/drivers/slip.h2
-rw-r--r--arch/um/drivers/slip_kern.c2
-rw-r--r--arch/um/drivers/slip_user.c2
-rw-r--r--arch/um/drivers/slirp.h2
-rw-r--r--arch/um/drivers/slirp_kern.c2
-rw-r--r--arch/um/drivers/slirp_user.c2
-rw-r--r--arch/um/drivers/ssl.c4
-rw-r--r--arch/um/drivers/stdio_console.c2
-rw-r--r--arch/um/drivers/tty.c4
-rw-r--r--arch/um/drivers/xterm.c4
27 files changed, 46 insertions, 46 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index e82764f75e7f..3576b3cc505e 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -110,7 +110,7 @@ static void not_configged_free(void *data)
110 "UML\n"); 110 "UML\n");
111} 111}
112 112
113static struct chan_ops not_configged_ops = { 113static const struct chan_ops not_configged_ops = {
114 .init = not_configged_init, 114 .init = not_configged_init,
115 .open = not_configged_open, 115 .open = not_configged_open,
116 .close = not_configged_close, 116 .close = not_configged_close,
@@ -373,7 +373,7 @@ int console_write_chan(struct list_head *chans, const char *buf, int len)
373} 373}
374 374
375int console_open_chan(struct line *line, struct console *co, 375int console_open_chan(struct line *line, struct console *co,
376 struct chan_opts *opts) 376 const struct chan_opts *opts)
377{ 377{
378 int err; 378 int err;
379 379
@@ -494,10 +494,10 @@ int chan_config_string(struct list_head *chans, char *str, int size,
494 494
495struct chan_type { 495struct chan_type {
496 char *key; 496 char *key;
497 struct chan_ops *ops; 497 const struct chan_ops *ops;
498}; 498};
499 499
500static struct chan_type chan_table[] = { 500static const struct chan_type chan_table[] = {
501 { "fd", &fd_ops }, 501 { "fd", &fd_ops },
502 502
503#ifdef CONFIG_NULL_CHAN 503#ifdef CONFIG_NULL_CHAN
@@ -534,10 +534,10 @@ static struct chan_type chan_table[] = {
534}; 534};
535 535
536static struct chan *parse_chan(struct line *line, char *str, int device, 536static struct chan *parse_chan(struct line *line, char *str, int device,
537 struct chan_opts *opts) 537 const struct chan_opts *opts)
538{ 538{
539 struct chan_type *entry; 539 const struct chan_type *entry;
540 struct chan_ops *ops; 540 const struct chan_ops *ops;
541 struct chan *chan; 541 struct chan *chan;
542 void *data; 542 void *data;
543 int i; 543 int i;
@@ -582,7 +582,7 @@ static struct chan *parse_chan(struct line *line, char *str, int device,
582} 582}
583 583
584int parse_chan_pair(char *str, struct line *line, int device, 584int parse_chan_pair(char *str, struct line *line, int device,
585 struct chan_opts *opts) 585 const struct chan_opts *opts)
586{ 586{
587 struct list_head *chans = &line->chan_list; 587 struct list_head *chans = &line->chan_list;
588 struct chan *new, *chan; 588 struct chan *new, *chan;
diff --git a/arch/um/drivers/daemon.h b/arch/um/drivers/daemon.h
index 7326c42f7ef9..3bc3cf6b94aa 100644
--- a/arch/um/drivers/daemon.h
+++ b/arch/um/drivers/daemon.h
@@ -18,7 +18,7 @@ struct daemon_data {
18 void *dev; 18 void *dev;
19}; 19};
20 20
21extern struct net_user_info daemon_user_info; 21extern const struct net_user_info daemon_user_info;
22 22
23extern int daemon_user_write(int fd, void *buf, int len, 23extern int daemon_user_write(int fd, void *buf, int len,
24 struct daemon_data *pri); 24 struct daemon_data *pri);
diff --git a/arch/um/drivers/daemon_kern.c b/arch/um/drivers/daemon_kern.c
index 53d09ed78b42..824386974f88 100644
--- a/arch/um/drivers/daemon_kern.c
+++ b/arch/um/drivers/daemon_kern.c
@@ -57,7 +57,7 @@ static int daemon_write(int fd, struct sk_buff **skb,
57 (struct daemon_data *) &lp->user)); 57 (struct daemon_data *) &lp->user));
58} 58}
59 59
60static struct net_kern_info daemon_kern_info = { 60static const struct net_kern_info daemon_kern_info = {
61 .init = daemon_init, 61 .init = daemon_init,
62 .protocol = eth_protocol, 62 .protocol = eth_protocol,
63 .read = daemon_read, 63 .read = daemon_read,
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c
index c944265955e2..77954ea77043 100644
--- a/arch/um/drivers/daemon_user.c
+++ b/arch/um/drivers/daemon_user.c
@@ -182,7 +182,7 @@ static int daemon_set_mtu(int mtu, void *data)
182 return(mtu); 182 return(mtu);
183} 183}
184 184
185struct net_user_info daemon_user_info = { 185const struct net_user_info daemon_user_info = {
186 .init = daemon_user_init, 186 .init = daemon_user_init,
187 .open = daemon_open, 187 .open = daemon_open,
188 .close = NULL, 188 .close = NULL,
diff --git a/arch/um/drivers/fd.c b/arch/um/drivers/fd.c
index c41f75e4acb5..108b7dafbd0e 100644
--- a/arch/um/drivers/fd.c
+++ b/arch/um/drivers/fd.c
@@ -20,7 +20,7 @@ struct fd_chan {
20 char str[sizeof("1234567890\0")]; 20 char str[sizeof("1234567890\0")];
21}; 21};
22 22
23static void *fd_init(char *str, int device, struct chan_opts *opts) 23static void *fd_init(char *str, int device, const struct chan_opts *opts)
24{ 24{
25 struct fd_chan *data; 25 struct fd_chan *data;
26 char *end; 26 char *end;
@@ -77,7 +77,7 @@ static void fd_close(int fd, void *d)
77 } 77 }
78} 78}
79 79
80struct chan_ops fd_ops = { 80const struct chan_ops fd_ops = {
81 .type = "fd", 81 .type = "fd",
82 .init = fd_init, 82 .init = fd_init,
83 .open = fd_open, 83 .open = fd_open,
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c
index 37232f908cd7..d247ef45c374 100644
--- a/arch/um/drivers/hostaudio_kern.c
+++ b/arch/um/drivers/hostaudio_kern.c
@@ -280,7 +280,7 @@ static int hostmixer_release(struct inode *inode, struct file *file)
280 280
281/* kernel module operations */ 281/* kernel module operations */
282 282
283static struct file_operations hostaudio_fops = { 283static const struct file_operations hostaudio_fops = {
284 .owner = THIS_MODULE, 284 .owner = THIS_MODULE,
285 .llseek = no_llseek, 285 .llseek = no_llseek,
286 .read = hostaudio_read, 286 .read = hostaudio_read,
@@ -292,7 +292,7 @@ static struct file_operations hostaudio_fops = {
292 .release = hostaudio_release, 292 .release = hostaudio_release,
293}; 293};
294 294
295static struct file_operations hostmixer_fops = { 295static const struct file_operations hostmixer_fops = {
296 .owner = THIS_MODULE, 296 .owner = THIS_MODULE,
297 .llseek = no_llseek, 297 .llseek = no_llseek,
298 .ioctl = hostmixer_ioctl_mixdev, 298 .ioctl = hostmixer_ioctl_mixdev,
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index ebebaabb78ad..563ce7690a1e 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -251,7 +251,7 @@ void line_set_termios(struct tty_struct *tty, struct termios * old)
251 /* nothing */ 251 /* nothing */
252} 252}
253 253
254static struct { 254static const struct {
255 int cmd; 255 int cmd;
256 char *level; 256 char *level;
257 char *name; 257 char *name;
@@ -405,7 +405,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data,
405 405
406int line_setup_irq(int fd, int input, int output, struct line *line, void *data) 406int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
407{ 407{
408 struct line_driver *driver = line->driver; 408 const struct line_driver *driver = line->driver;
409 int err = 0, flags = IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM; 409 int err = 0, flags = IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM;
410 410
411 if (input) 411 if (input)
@@ -558,7 +558,7 @@ int line_setup(struct line *lines, unsigned int num, char *init)
558} 558}
559 559
560int line_config(struct line *lines, unsigned int num, char *str, 560int line_config(struct line *lines, unsigned int num, char *str,
561 struct chan_opts *opts) 561 const struct chan_opts *opts)
562{ 562{
563 struct line *line; 563 struct line *line;
564 char *new; 564 char *new;
diff --git a/arch/um/drivers/mcast.h b/arch/um/drivers/mcast.h
index a2c6db243458..bc56af9d3e53 100644
--- a/arch/um/drivers/mcast.h
+++ b/arch/um/drivers/mcast.h
@@ -13,7 +13,7 @@ struct mcast_data {
13 void *dev; 13 void *dev;
14}; 14};
15 15
16extern struct net_user_info mcast_user_info; 16extern const struct net_user_info mcast_user_info;
17 17
18extern int mcast_user_write(int fd, void *buf, int len, 18extern int mcast_user_write(int fd, void *buf, int len,
19 struct mcast_data *pri); 19 struct mcast_data *pri);
diff --git a/arch/um/drivers/mcast_kern.c b/arch/um/drivers/mcast_kern.c
index 3a7af18cf944..c090fbd464e7 100644
--- a/arch/um/drivers/mcast_kern.c
+++ b/arch/um/drivers/mcast_kern.c
@@ -61,7 +61,7 @@ static int mcast_write(int fd, struct sk_buff **skb,
61 (struct mcast_data *) &lp->user); 61 (struct mcast_data *) &lp->user);
62} 62}
63 63
64static struct net_kern_info mcast_kern_info = { 64static const struct net_kern_info mcast_kern_info = {
65 .init = mcast_init, 65 .init = mcast_init,
66 .protocol = eth_protocol, 66 .protocol = eth_protocol,
67 .read = mcast_read, 67 .read = mcast_read,
diff --git a/arch/um/drivers/mcast_user.c b/arch/um/drivers/mcast_user.c
index afe85bfa66e0..4d2bd39a85bc 100644
--- a/arch/um/drivers/mcast_user.c
+++ b/arch/um/drivers/mcast_user.c
@@ -152,7 +152,7 @@ static int mcast_set_mtu(int mtu, void *data)
152 return(mtu); 152 return(mtu);
153} 153}
154 154
155struct net_user_info mcast_user_info = { 155const struct net_user_info mcast_user_info = {
156 .init = mcast_user_init, 156 .init = mcast_user_init,
157 .open = mcast_open, 157 .open = mcast_open,
158 .close = mcast_close, 158 .close = mcast_close,
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
index 022f67bb6873..9a3b5daf6250 100644
--- a/arch/um/drivers/mmapper_kern.c
+++ b/arch/um/drivers/mmapper_kern.c
@@ -85,7 +85,7 @@ mmapper_release(struct inode *inode, struct file *file)
85 return 0; 85 return 0;
86} 86}
87 87
88static struct file_operations mmapper_fops = { 88static const struct file_operations mmapper_fops = {
89 .owner = THIS_MODULE, 89 .owner = THIS_MODULE,
90 .read = mmapper_read, 90 .read = mmapper_read,
91 .write = mmapper_write, 91 .write = mmapper_write,
@@ -95,7 +95,7 @@ static struct file_operations mmapper_fops = {
95 .release = mmapper_release, 95 .release = mmapper_release,
96}; 96};
97 97
98static struct miscdevice mmapper_dev = { 98static const struct miscdevice mmapper_dev = {
99 .minor = MISC_DYNAMIC_MINOR, 99 .minor = MISC_DYNAMIC_MINOR,
100 .name = "mmapper", 100 .name = "mmapper",
101 .fops = &mmapper_fops 101 .fops = &mmapper_fops
diff --git a/arch/um/drivers/null.c b/arch/um/drivers/null.c
index 14cc5f78398a..3683ed44315d 100644
--- a/arch/um/drivers/null.c
+++ b/arch/um/drivers/null.c
@@ -10,7 +10,7 @@
10 10
11static int null_chan; 11static int null_chan;
12 12
13static void *null_init(char *str, int device, struct chan_opts *opts) 13static void *null_init(char *str, int device, const struct chan_opts *opts)
14{ 14{
15 return(&null_chan); 15 return(&null_chan);
16} 16}
@@ -31,7 +31,7 @@ static void null_free(void *data)
31{ 31{
32} 32}
33 33
34struct chan_ops null_ops = { 34const struct chan_ops null_ops = {
35 .type = "null", 35 .type = "null",
36 .init = null_init, 36 .init = null_init,
37 .open = null_open, 37 .open = null_open,
diff --git a/arch/um/drivers/pcap_kern.c b/arch/um/drivers/pcap_kern.c
index 4c767c7adb96..6e1ef8558283 100644
--- a/arch/um/drivers/pcap_kern.c
+++ b/arch/um/drivers/pcap_kern.c
@@ -46,7 +46,7 @@ static int pcap_write(int fd, struct sk_buff **skb, struct uml_net_private *lp)
46 return(-EPERM); 46 return(-EPERM);
47} 47}
48 48
49static struct net_kern_info pcap_kern_info = { 49static const struct net_kern_info pcap_kern_info = {
50 .init = pcap_init, 50 .init = pcap_init,
51 .protocol = eth_protocol, 51 .protocol = eth_protocol,
52 .read = pcap_read, 52 .read = pcap_read,
diff --git a/arch/um/drivers/pcap_user.c b/arch/um/drivers/pcap_user.c
index edfcb29273e1..2ef641ded960 100644
--- a/arch/um/drivers/pcap_user.c
+++ b/arch/um/drivers/pcap_user.c
@@ -120,7 +120,7 @@ int pcap_user_read(int fd, void *buffer, int len, struct pcap_data *pri)
120 return(hdata.len); 120 return(hdata.len);
121} 121}
122 122
123struct net_user_info pcap_user_info = { 123const struct net_user_info pcap_user_info = {
124 .init = pcap_user_init, 124 .init = pcap_user_init,
125 .open = pcap_open, 125 .open = pcap_open,
126 .close = NULL, 126 .close = NULL,
diff --git a/arch/um/drivers/port_user.c b/arch/um/drivers/port_user.c
index c43e8bb32502..f2e8fc42ecc2 100644
--- a/arch/um/drivers/port_user.c
+++ b/arch/um/drivers/port_user.c
@@ -27,7 +27,7 @@ struct port_chan {
27 char dev[sizeof("32768\0")]; 27 char dev[sizeof("32768\0")];
28}; 28};
29 29
30static void *port_init(char *str, int device, struct chan_opts *opts) 30static void *port_init(char *str, int device, const struct chan_opts *opts)
31{ 31{
32 struct port_chan *data; 32 struct port_chan *data;
33 void *kern_data; 33 void *kern_data;
@@ -100,7 +100,7 @@ static void port_close(int fd, void *d)
100 os_close_file(fd); 100 os_close_file(fd);
101} 101}
102 102
103struct chan_ops port_ops = { 103const struct chan_ops port_ops = {
104 .type = "port", 104 .type = "port",
105 .init = port_init, 105 .init = port_init,
106 .open = port_open, 106 .open = port_open,
diff --git a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c
index 1c555c38de4d..abec620e8380 100644
--- a/arch/um/drivers/pty.c
+++ b/arch/um/drivers/pty.c
@@ -22,7 +22,7 @@ struct pty_chan {
22 char dev_name[sizeof("/dev/pts/0123456\0")]; 22 char dev_name[sizeof("/dev/pts/0123456\0")];
23}; 23};
24 24
25static void *pty_chan_init(char *str, int device, struct chan_opts *opts) 25static void *pty_chan_init(char *str, int device, const struct chan_opts *opts)
26{ 26{
27 struct pty_chan *data; 27 struct pty_chan *data;
28 28
@@ -118,7 +118,7 @@ static int pty_open(int input, int output, int primary, void *d,
118 return(fd); 118 return(fd);
119} 119}
120 120
121struct chan_ops pty_ops = { 121const struct chan_ops pty_ops = {
122 .type = "pty", 122 .type = "pty",
123 .init = pty_chan_init, 123 .init = pty_chan_init,
124 .open = pty_open, 124 .open = pty_open,
@@ -131,7 +131,7 @@ struct chan_ops pty_ops = {
131 .winch = 0, 131 .winch = 0,
132}; 132};
133 133
134struct chan_ops pts_ops = { 134const struct chan_ops pts_ops = {
135 .type = "pts", 135 .type = "pts",
136 .init = pty_chan_init, 136 .init = pty_chan_init,
137 .open = pts_open, 137 .open = pts_open,
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index ba471f5864a6..ae9909415b9c 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -68,7 +68,7 @@ static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size,
68 return ret; 68 return ret;
69} 69}
70 70
71static struct file_operations rng_chrdev_ops = { 71static const struct file_operations rng_chrdev_ops = {
72 .owner = THIS_MODULE, 72 .owner = THIS_MODULE,
73 .open = rng_dev_open, 73 .open = rng_dev_open,
74 .read = rng_dev_read, 74 .read = rng_dev_read,
diff --git a/arch/um/drivers/slip.h b/arch/um/drivers/slip.h
index bb0dab41c2e4..c64f8c61d274 100644
--- a/arch/um/drivers/slip.h
+++ b/arch/um/drivers/slip.h
@@ -12,7 +12,7 @@ struct slip_data {
12 struct slip_proto slip; 12 struct slip_proto slip;
13}; 13};
14 14
15extern struct net_user_info slip_user_info; 15extern const struct net_user_info slip_user_info;
16 16
17extern int slip_user_read(int fd, void *buf, int len, struct slip_data *pri); 17extern int slip_user_read(int fd, void *buf, int len, struct slip_data *pri);
18extern int slip_user_write(int fd, void *buf, int len, struct slip_data *pri); 18extern int slip_user_write(int fd, void *buf, int len, struct slip_data *pri);
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c
index 163ee0d5f75e..ccea2d7885e5 100644
--- a/arch/um/drivers/slip_kern.c
+++ b/arch/um/drivers/slip_kern.c
@@ -61,7 +61,7 @@ static int slip_write(int fd, struct sk_buff **skb,
61 (struct slip_data *) &lp->user)); 61 (struct slip_data *) &lp->user));
62} 62}
63 63
64struct net_kern_info slip_kern_info = { 64const struct net_kern_info slip_kern_info = {
65 .init = slip_init, 65 .init = slip_init,
66 .protocol = slip_protocol, 66 .protocol = slip_protocol,
67 .read = slip_read, 67 .read = slip_read,
diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c
index 89fbec185cc1..8460285c69a5 100644
--- a/arch/um/drivers/slip_user.c
+++ b/arch/um/drivers/slip_user.c
@@ -241,7 +241,7 @@ static void slip_del_addr(unsigned char *addr, unsigned char *netmask,
241 close_addr(addr, netmask, pri->name); 241 close_addr(addr, netmask, pri->name);
242} 242}
243 243
244struct net_user_info slip_user_info = { 244const struct net_user_info slip_user_info = {
245 .init = slip_user_init, 245 .init = slip_user_init,
246 .open = slip_open, 246 .open = slip_open,
247 .close = slip_close, 247 .close = slip_close,
diff --git a/arch/um/drivers/slirp.h b/arch/um/drivers/slirp.h
index 6cf88ab580c9..89ccf83b7577 100644
--- a/arch/um/drivers/slirp.h
+++ b/arch/um/drivers/slirp.h
@@ -24,7 +24,7 @@ struct slirp_data {
24 struct slip_proto slip; 24 struct slip_proto slip;
25}; 25};
26 26
27extern struct net_user_info slirp_user_info; 27extern const struct net_user_info slirp_user_info;
28 28
29extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri); 29extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri);
30extern int slirp_user_write(int fd, void *buf, int len, 30extern int slirp_user_write(int fd, void *buf, int len,
diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c
index 95e50c943e14..ae322e1c8a87 100644
--- a/arch/um/drivers/slirp_kern.c
+++ b/arch/um/drivers/slirp_kern.c
@@ -64,7 +64,7 @@ static int slirp_write(int fd, struct sk_buff **skb,
64 (struct slirp_data *) &lp->user)); 64 (struct slirp_data *) &lp->user));
65} 65}
66 66
67struct net_kern_info slirp_kern_info = { 67const struct net_kern_info slirp_kern_info = {
68 .init = slirp_init, 68 .init = slirp_init,
69 .protocol = slirp_protocol, 69 .protocol = slirp_protocol,
70 .read = slirp_read, 70 .read = slirp_read,
diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c
index 33c5f6e625e8..ce5e85d1de3d 100644
--- a/arch/um/drivers/slirp_user.c
+++ b/arch/um/drivers/slirp_user.c
@@ -126,7 +126,7 @@ static int slirp_set_mtu(int mtu, void *data)
126 return(mtu); 126 return(mtu);
127} 127}
128 128
129struct net_user_info slirp_user_info = { 129const struct net_user_info slirp_user_info = {
130 .init = slirp_user_init, 130 .init = slirp_user_init,
131 .open = slirp_open, 131 .open = slirp_open,
132 .close = slirp_close, 132 .close = slirp_close,
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
index 6dafd6fbfdae..6f13e7c71a82 100644
--- a/arch/um/drivers/ssl.c
+++ b/arch/um/drivers/ssl.c
@@ -23,7 +23,7 @@
23#include "irq_user.h" 23#include "irq_user.h"
24#include "mconsole_kern.h" 24#include "mconsole_kern.h"
25 25
26static int ssl_version = 1; 26static const int ssl_version = 1;
27 27
28/* Referenced only by tty_driver below - presumably it's locked correctly 28/* Referenced only by tty_driver below - presumably it's locked correctly
29 * by the tty driver. 29 * by the tty driver.
@@ -123,7 +123,7 @@ void ssl_hangup(struct tty_struct *tty)
123} 123}
124#endif 124#endif
125 125
126static struct tty_operations ssl_ops = { 126static const struct tty_operations ssl_ops = {
127 .open = ssl_open, 127 .open = ssl_open,
128 .close = line_close, 128 .close = line_close,
129 .write = line_write, 129 .write = line_write,
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c
index 856f568c2687..5e44adb07051 100644
--- a/arch/um/drivers/stdio_console.c
+++ b/arch/um/drivers/stdio_console.c
@@ -110,7 +110,7 @@ static int con_open(struct tty_struct *tty, struct file *filp)
110 110
111static int con_init_done = 0; 111static int con_init_done = 0;
112 112
113static struct tty_operations console_ops = { 113static const struct tty_operations console_ops = {
114 .open = con_open, 114 .open = con_open,
115 .close = line_close, 115 .close = line_close,
116 .write = line_write, 116 .write = line_write,
diff --git a/arch/um/drivers/tty.c b/arch/um/drivers/tty.c
index 9f70edf5d8ef..11de3ac1eb5c 100644
--- a/arch/um/drivers/tty.c
+++ b/arch/um/drivers/tty.c
@@ -18,7 +18,7 @@ struct tty_chan {
18 struct termios tt; 18 struct termios tt;
19}; 19};
20 20
21static void *tty_chan_init(char *str, int device, struct chan_opts *opts) 21static void *tty_chan_init(char *str, int device, const struct chan_opts *opts)
22{ 22{
23 struct tty_chan *data; 23 struct tty_chan *data;
24 24
@@ -62,7 +62,7 @@ static int tty_open(int input, int output, int primary, void *d,
62 return fd; 62 return fd;
63} 63}
64 64
65struct chan_ops tty_ops = { 65const struct chan_ops tty_ops = {
66 .type = "tty", 66 .type = "tty",
67 .init = tty_chan_init, 67 .init = tty_chan_init,
68 .open = tty_open, 68 .open = tty_open,
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c
index aaa636661043..386f8b952982 100644
--- a/arch/um/drivers/xterm.c
+++ b/arch/um/drivers/xterm.c
@@ -31,7 +31,7 @@ struct xterm_chan {
31}; 31};
32 32
33/* Not static because it's called directly by the tt mode gdb code */ 33/* Not static because it's called directly by the tt mode gdb code */
34void *xterm_init(char *str, int device, struct chan_opts *opts) 34void *xterm_init(char *str, int device, const struct chan_opts *opts)
35{ 35{
36 struct xterm_chan *data; 36 struct xterm_chan *data;
37 37
@@ -194,7 +194,7 @@ static void xterm_free(void *d)
194 free(d); 194 free(d);
195} 195}
196 196
197struct chan_ops xterm_ops = { 197const struct chan_ops xterm_ops = {
198 .type = "xterm", 198 .type = "xterm",
199 .init = xterm_init, 199 .init = xterm_init,
200 .open = xterm_open, 200 .open = xterm_open,