The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: WANG Cong <xiyou.wangcong@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Eric Sesterhenn <snakebyte@gmx.de>,
	xiyou.wangcong@gmail.com, linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net, jdike@addtoit.com
Subject: Re: [Patch] um: fix a build error
Date: Tue, 22 Jul 2008 18:35:09 +0100	[thread overview]
Message-ID: <20080722173509.GE3081@hack.voiplan.pt> (raw)
In-Reply-To: <20080722115354.79ba2314@lxorguk.ukuu.org.uk>

On Tue, Jul 22, 2008 at 11:53:54AM +0100, Alan Cox wrote:
>> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
>> 
>> --- linux-2.6/arch/um/drivers/line.c.orig	2008-07-22 12:06:17.000000000 +0200
>> +++ linux-2.6/arch/um/drivers/line.c	2008-07-22 12:06:49.000000000 +0200
>> @@ -362,10 +362,8 @@ static irqreturn_t line_write_interrupt(
>>  	if (tty == NULL)
>>  		return IRQ_NONE;
>>  
>> -	if (test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) &&
>> -	   (tty->ldisc.write_wakeup != NULL))
>> -		(tty->ldisc.write_wakeup)(tty);
>> -
>> +	if (test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags))
>> +		tty_wakeup(tty);
>
>Sorry I should have been clearer - you don't want the test_bit either.
>

What about the below one?

Signed-off-by: WANG Cong <wangcong@zeuux.org>

---

diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 5047490..d741f35 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -362,19 +362,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data)
 	if (tty == NULL)
 		return IRQ_NONE;
 
-	if (test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) &&
-	   (tty->ldisc.write_wakeup != NULL))
-		(tty->ldisc.write_wakeup)(tty);
-
-	/*
-	 * BLOCKING mode
-	 * In blocking mode, everything sleeps on tty->write_wait.
-	 * Sleeping in the console driver would break non-blocking
-	 * writes.
-	 */
-
-	if (waitqueue_active(&tty->write_wait))
-		wake_up_interruptible(&tty->write_wait);
+	tty_wakeup(tty);
 	return IRQ_HANDLED;
 }
 

  parent reply	other threads:[~2008-07-22 17:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 10:58 [Patch] um: fix a build error Eric Sesterhenn
2008-07-22 10:53 ` Alan Cox
2008-07-22 11:25   ` WANG Cong
2008-07-22 17:35   ` WANG Cong [this message]
2008-07-22 17:42     ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2008-07-21 16:54 WANG Cong
2008-07-21 16:32 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080722173509.GE3081@hack.voiplan.pt \
    --to=xiyou.wangcong@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snakebyte@gmx.de \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox