[mmotm] adapt ia64/hp/sim/simserial.c to new tty framework

From: KOSAKI Motohiro
Date: Mon Jul 14 2008 - 12:13:47 EST



Patch title: adapt-ia64-hp-simserial-to-new-tty-ldisc.patch
Against: mmotm Jul 14
Applies after: linux-next.patch

Recently, Alan Cox made cleanup tty widely.
But unfortunately it cause simserial build error.
This patch fixes it.

arch/ia64/hp/sim/simserial.c: In function 'rs_flush_buffer':
arch/ia64/hp/sim/simserial.c:357: error: 'struct tty_ldisc' has no member named 'write_wakeup'
arch/ia64/hp/sim/simserial.c:358: error: 'struct tty_ldisc' has no member named 'write_wakeup'
arch/ia64/hp/sim/simserial.c: In function 'rs_close':
arch/ia64/hp/sim/simserial.c:628: error: 'struct tty_ldisc' has no member named 'flush_buffer'
arch/ia64/hp/sim/simserial.c:628: error: 'struct tty_ldisc' has no member named 'flush_buffer'
arch/ia64/hp/sim/simserial.c: At top level:
arch/ia64/hp/sim/simserial.c:958: warning: initialization from incompatible pointer type


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
CC: Alan Cox <alan@xxxxxxxxxx>
CC: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
arch/ia64/hp/sim/simserial.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Index: b/arch/ia64/hp/sim/simserial.c
===================================================================
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -354,8 +354,8 @@ static void rs_flush_buffer(struct tty_s
wake_up_interruptible(&tty->write_wait);

if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup)
- (tty->ldisc.write_wakeup)(tty);
+ tty->ldisc.ops->write_wakeup)
+ (tty->ldisc.ops->write_wakeup)(tty);
}

/*
@@ -407,8 +407,9 @@ static void rs_unthrottle(struct tty_str
/*
* rs_break() --- routine which turns the break handling on or off
*/
-static void rs_break(struct tty_struct *tty, int break_state)
+static int rs_break(struct tty_struct *tty, int break_state)
{
+ return 0;
}

static int rs_ioctl(struct tty_struct *tty, struct file * file,
@@ -625,7 +626,8 @@ static void rs_close(struct tty_struct *
shutdown(info);
if (tty->ops->flush_buffer)
tty->ops->flush_buffer(tty);
- if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty);
+ if (tty->ldisc.ops->flush_buffer)
+ tty->ldisc.ops->flush_buffer(tty);
info->event = 0;
info->tty = NULL;
if (info->blocked_open) {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/