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>

authored by Alan Cox and committed by Linus Torvalds 11b0cc3a 4600ecfc

+2 -3
+2 -3
drivers/net/wan/x25_asy.c
··· 554 554 static int x25_asy_open_tty(struct tty_struct *tty) 555 555 { 556 556 struct x25_asy *sl = (struct x25_asy *) tty->disc_data; 557 + struct tty_ldisc *ld; 557 558 int err; 558 559 559 560 /* First make sure we're not already connected. */ ··· 573 572 if (tty->driver->flush_buffer) { 574 573 tty->driver->flush_buffer(tty); 575 574 } 576 - if (tty->ldisc.flush_buffer) { 577 - tty->ldisc.flush_buffer(tty); 578 - } 575 + tty_ldisc_flush(tty); 579 576 580 577 /* Restore default settings */ 581 578 sl->dev->type = ARPHRD_X25;