Skip to content

Commit

Permalink
[PATCH] uml console channels: fix the API of console_write
Browse files Browse the repository at this point in the history
Since the 4th param is unused, remove it altogether.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
Acked-by: Jeff Dike <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Nov 14, 2005
1 parent fd9bc53 commit 55c033c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions arch/um/drivers/chan_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ static int not_configged_write(int fd, const char *buf, int len, void *data)
return(-EIO);
}

static int not_configged_console_write(int fd, const char *buf, int len,
void *data)
static int not_configged_console_write(int fd, const char *buf, int len)
{
my_puts("Using a channel type which is configured out of "
"UML\n");
Expand Down Expand Up @@ -299,7 +298,7 @@ int console_write_chan(struct list_head *chans, const char *buf, int len)
chan = list_entry(ele, struct chan, list);
if(!chan->output || (chan->ops->console_write == NULL))
continue;
n = chan->ops->console_write(chan->fd, buf, len, chan->data);
n = chan->ops->console_write(chan->fd, buf, len);
if(chan->primary) ret = n;
}
return(ret);
Expand Down
2 changes: 1 addition & 1 deletion arch/um/drivers/chan_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "choose-mode.h"
#include "mode.h"

int generic_console_write(int fd, const char *buf, int n, void *unused)
int generic_console_write(int fd, const char *buf, int n)
{
struct termios save, new;
int err;
Expand Down
4 changes: 2 additions & 2 deletions arch/um/include/chan_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct chan_ops {
void (*close)(int, void *);
int (*read)(int, char *, void *);
int (*write)(int, const char *, int, void *);
int (*console_write)(int, const char *, int, void *);
int (*console_write)(int, const char *, int);
int (*window_size)(int, void *, unsigned short *, unsigned short *);
void (*free)(void *);
int winch;
Expand All @@ -37,7 +37,7 @@ extern struct chan_ops fd_ops, null_ops, port_ops, pts_ops, pty_ops, tty_ops,
extern void generic_close(int fd, void *unused);
extern int generic_read(int fd, char *c_out, void *unused);
extern int generic_write(int fd, const char *buf, int n, void *unused);
extern int generic_console_write(int fd, const char *buf, int n, void *state);
extern int generic_console_write(int fd, const char *buf, int n);
extern int generic_window_size(int fd, void *unused, unsigned short *rows_out,
unsigned short *cols_out);
extern void generic_free(void *data);
Expand Down

0 comments on commit 55c033c

Please sign in to comment.