Skip to content

Commit

Permalink
consoles: switch to int put_char method
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Kelly Daly <kelly@au.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Apr 30, 2008
1 parent 55da778 commit 5d19f54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions drivers/char/viocons.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,20 +628,21 @@ static int viotty_write(struct tty_struct *tty, const unsigned char *buf,
/*
* TTY put_char method
*/
static void viotty_put_char(struct tty_struct *tty, unsigned char ch)
static int viotty_put_char(struct tty_struct *tty, unsigned char ch)
{
struct port_info *pi;

pi = get_port_data(tty);
if (pi == NULL)
return;
return 0;

/* This will append '\r' as well if the char is '\n' */
if (viochar_is_console(pi))
hvlogOutput(&ch, 1);

if (viopath_isactive(pi->lp))
internal_write(pi, &ch, 1);
return 1;
}

/*
Expand Down
6 changes: 3 additions & 3 deletions drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2642,11 +2642,11 @@ static int con_write(struct tty_struct *tty, const unsigned char *buf, int count
return retval;
}

static void con_put_char(struct tty_struct *tty, unsigned char ch)
static int con_put_char(struct tty_struct *tty, unsigned char ch)
{
if (in_interrupt())
return; /* n_r3964 calls put_char() from interrupt context */
do_con_write(tty, &ch, 1);
return 0; /* n_r3964 calls put_char() from interrupt context */
return do_con_write(tty, &ch, 1);
}

static int con_write_room(struct tty_struct *tty)
Expand Down

0 comments on commit 5d19f54

Please sign in to comment.