aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-02-08 18:00:48 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 18:33:33 -0500
commit11b0cc3a4af65413ca3bb5698769e091486e0b22 (patch)
treeeebb0788777410b6cad2ca926cd2ec254221e72a /drivers/net/wan
parent4600ecfcf3ad160ac0c6fcff6115f6edb081ccfa (diff)
x25_asy: Fix ref count rule violation
x25_asy does not take an ldisc reference before calling the flush method. Fix it to use the helper function we provide. Signed-off-by: Alan Cox <alan@redhat.com> Cc: Krzysztof Halasa <khc@pm.waw.pl> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/x25_asy.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 1e89d4de1bb7..5e2d763c6b5f 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -554,6 +554,7 @@ static void x25_asy_receive_buf(struct tty_struct *tty, const unsigned char *cp,
554static int x25_asy_open_tty(struct tty_struct *tty) 554static int x25_asy_open_tty(struct tty_struct *tty)
555{ 555{
556 struct x25_asy *sl = (struct x25_asy *) tty->disc_data; 556 struct x25_asy *sl = (struct x25_asy *) tty->disc_data;
557 struct tty_ldisc *ld;
557 int err; 558 int err;
558 559
559 /* First make sure we're not already connected. */ 560 /* First make sure we're not already connected. */
@@ -572,9 +573,7 @@ static int x25_asy_open_tty(struct tty_struct *tty)
572 if (tty->driver->flush_buffer) { 573 if (tty->driver->flush_buffer) {
573 tty->driver->flush_buffer(tty); 574 tty->driver->flush_buffer(tty);
574 } 575 }
575 if (tty->ldisc.flush_buffer) { 576 tty_ldisc_flush(tty);
576 tty->ldisc.flush_buffer(tty);
577 }
578 577
579 /* Restore default settings */ 578 /* Restore default settings */
580 sl->dev->type = ARPHRD_X25; 579 sl->dev->type = ARPHRD_X25;