Commit 55c033c1f6cdedc350c79c3198b542e3ab496899

Authored by Paolo 'Blaisorblade' Giarrusso
Committed by Linus Torvalds
1 parent fd9bc53b99

[PATCH] uml console channels: fix the API of console_write

Since the 4th param is unused, remove it altogether.

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>

Showing 3 changed files with 5 additions and 6 deletions Side-by-side Diff

arch/um/drivers/chan_kern.c
... ... @@ -89,8 +89,7 @@
89 89 return(-EIO);
90 90 }
91 91  
92   -static int not_configged_console_write(int fd, const char *buf, int len,
93   - void *data)
  92 +static int not_configged_console_write(int fd, const char *buf, int len)
94 93 {
95 94 my_puts("Using a channel type which is configured out of "
96 95 "UML\n");
... ... @@ -299,7 +298,7 @@
299 298 chan = list_entry(ele, struct chan, list);
300 299 if(!chan->output || (chan->ops->console_write == NULL))
301 300 continue;
302   - n = chan->ops->console_write(chan->fd, buf, len, chan->data);
  301 + n = chan->ops->console_write(chan->fd, buf, len);
303 302 if(chan->primary) ret = n;
304 303 }
305 304 return(ret);
arch/um/drivers/chan_user.c
... ... @@ -20,7 +20,7 @@
20 20 #include "choose-mode.h"
21 21 #include "mode.h"
22 22  
23   -int generic_console_write(int fd, const char *buf, int n, void *unused)
  23 +int generic_console_write(int fd, const char *buf, int n)
24 24 {
25 25 struct termios save, new;
26 26 int err;
arch/um/include/chan_user.h
... ... @@ -25,7 +25,7 @@
25 25 void (*close)(int, void *);
26 26 int (*read)(int, char *, void *);
27 27 int (*write)(int, const char *, int, void *);
28   - int (*console_write)(int, const char *, int, void *);
  28 + int (*console_write)(int, const char *, int);
29 29 int (*window_size)(int, void *, unsigned short *, unsigned short *);
30 30 void (*free)(void *);
31 31 int winch;
... ... @@ -37,7 +37,7 @@
37 37 extern void generic_close(int fd, void *unused);
38 38 extern int generic_read(int fd, char *c_out, void *unused);
39 39 extern int generic_write(int fd, const char *buf, int n, void *unused);
40   -extern int generic_console_write(int fd, const char *buf, int n, void *state);
  40 +extern int generic_console_write(int fd, const char *buf, int n);
41 41 extern int generic_window_size(int fd, void *unused, unsigned short *rows_out,
42 42 unsigned short *cols_out);
43 43 extern void generic_free(void *data);