Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=11b0cc3a4af65413ca3bb5698769e091486e0b22
Commit:     11b0cc3a4af65413ca3bb5698769e091486e0b22
Parent:     4600ecfcf3ad160ac0c6fcff6115f6edb081ccfa
Author:     Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 8 15:00:48 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Feb 8 15:33:33 2008 -0800

    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 <[EMAIL PROTECTED]>
    Cc: Krzysztof Halasa <[EMAIL PROTECTED]>
    Cc: "David S. Miller" <[EMAIL PROTECTED]>
    Cc: Jeff Garzik <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/net/wan/x25_asy.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 1e89d4d..5e2d763 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,
 static int x25_asy_open_tty(struct tty_struct *tty)
 {
        struct x25_asy *sl = (struct x25_asy *) tty->disc_data;
+       struct tty_ldisc *ld;
        int err;
 
        /* First make sure we're not already connected. */
@@ -572,9 +573,7 @@ static int x25_asy_open_tty(struct tty_struct *tty)
        if (tty->driver->flush_buffer)  {
                tty->driver->flush_buffer(tty);
        }
-       if (tty->ldisc.flush_buffer)  {
-               tty->ldisc.flush_buffer(tty);
-       }
+       tty_ldisc_flush(tty);
 
        /* Restore default settings */
        sl->dev->type = ARPHRD_X25;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to