Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=acb2cf34cf624b9b3ab20c2c83543146128a4dad
Commit:     acb2cf34cf624b9b3ab20c2c83543146128a4dad
Parent:     054211acad0cb911177507a039d8e7a25bff084d
Author:     Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:30:42 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:25 2008 -0800

    uml: console driver cleanups
    
    Console driver cleanups -
        Changed an instance of foo = bar + foo to foo += bar
        Removed checks of tty->stopped - I don't think the low-level
    driver has any business looking at that
        Removed an annoying warning
    
    Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/drivers/line.c |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 83bf15a..5cff653 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -48,7 +48,7 @@ static int write_room(struct line *line)
        n = line->head - line->tail;
 
        if (n <= 0)
-               n = LINE_BUFSIZE + n; /* The other case */
+               n += LINE_BUFSIZE; /* The other case */
        return n - 1;
 }
 
@@ -58,17 +58,10 @@ int line_write_room(struct tty_struct *tty)
        unsigned long flags;
        int room;
 
-       if (tty->stopped)
-               return 0;
-
        spin_lock_irqsave(&line->lock, flags);
        room = write_room(line);
        spin_unlock_irqrestore(&line->lock, flags);
 
-       /*XXX: Warning to remove */
-       if (0 == room)
-               printk(KERN_DEBUG "%s: %s: no room left in buffer\n",
-                      __FUNCTION__,tty->name);
        return room;
 }
 
@@ -79,8 +72,7 @@ int line_chars_in_buffer(struct tty_struct *tty)
        int ret;
 
        spin_lock_irqsave(&line->lock, flags);
-
-       /*write_room subtracts 1 for the needed NULL, so we readd it.*/
+       /* write_room subtracts 1 for the needed NULL, so we readd it.*/
        ret = LINE_BUFSIZE - (write_room(line) + 1);
        spin_unlock_irqrestore(&line->lock, flags);
 
@@ -184,10 +176,6 @@ void line_flush_buffer(struct tty_struct *tty)
        unsigned long flags;
        int err;
 
-       /*XXX: copied from line_write, verify if it is correct!*/
-       if (tty->stopped)
-               return;
-
        spin_lock_irqsave(&line->lock, flags);
        err = flush_buffer(line);
        spin_unlock_irqrestore(&line->lock, flags);
@@ -213,9 +201,6 @@ int line_write(struct tty_struct *tty, const unsigned char 
*buf, int len)
        unsigned long flags;
        int n, ret = 0;
 
-       if (tty->stopped)
-               return 0;
-
        spin_lock_irqsave(&line->lock, flags);
        if (line->head != line->tail)
                ret = buffer_data(line, buf, len);
-
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