aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/pty.c
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-11-13 19:07:10 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 21:14:14 -0500
commitfd9bc53b99a77aefe89d810d889aa6385565959b (patch)
tree4708580ff00b6c0acce085e3c402f6cd7fd8f311 /arch/um/drivers/pty.c
parentc50d2c4d6685db9b45cf6521046296df5bc42592 (diff)
[PATCH] uml console channels: remove console_write wrappers
We were using a long series of (stupid) wrappers which all call generic_console_write(). Since the wrappers only change the 4th param, which is unused by the called proc, remove them and call generic_console_write() directly. If needed at any time in the future to reintroduce this stuff, the member could be moved to a generic struct, to avoid this duplicated handling. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/pty.c')
-rw-r--r--arch/um/drivers/pty.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c
index 0306a1b215b7..1c555c38de4d 100644
--- a/arch/um/drivers/pty.c
+++ b/arch/um/drivers/pty.c
@@ -118,13 +118,6 @@ static int pty_open(int input, int output, int primary, void *d,
118 return(fd); 118 return(fd);
119} 119}
120 120
121static int pty_console_write(int fd, const char *buf, int n, void *d)
122{
123 struct pty_chan *data = d;
124
125 return(generic_console_write(fd, buf, n, &data->tt));
126}
127
128struct chan_ops pty_ops = { 121struct chan_ops pty_ops = {
129 .type = "pty", 122 .type = "pty",
130 .init = pty_chan_init, 123 .init = pty_chan_init,
@@ -132,7 +125,7 @@ struct chan_ops pty_ops = {
132 .close = generic_close, 125 .close = generic_close,
133 .read = generic_read, 126 .read = generic_read,
134 .write = generic_write, 127 .write = generic_write,
135 .console_write = pty_console_write, 128 .console_write = generic_console_write,
136 .window_size = generic_window_size, 129 .window_size = generic_window_size,
137 .free = generic_free, 130 .free = generic_free,
138 .winch = 0, 131 .winch = 0,
@@ -145,7 +138,7 @@ struct chan_ops pts_ops = {
145 .close = generic_close, 138 .close = generic_close,
146 .read = generic_read, 139 .read = generic_read,
147 .write = generic_write, 140 .write = generic_write,
148 .console_write = pty_console_write, 141 .console_write = generic_console_write,
149 .window_size = generic_window_size, 142 .window_size = generic_window_size,
150 .free = generic_free, 143 .free = generic_free,
151 .winch = 0, 144 .winch = 0,