linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: mporter@kernel.crashing.org
Cc: kernel-janitors@lists.osdl.org, linuxppc-embedded@ozlabs.org
Subject: [UPDATE PATCH 18/20] ppc/serial_sicc: remove interruptible_sleep_on_timeout() usage
Date: Wed, 2 Feb 2005 15:05:15 -0800	[thread overview]
Message-ID: <20050202230515.GZ2546@us.ibm.com> (raw)
In-Reply-To: <20050202225504.GX2546@us.ibm.com>

On Wed, Feb 02, 2005 at 02:55:04PM -0800, Nishanth Aravamudan wrote:
> Hello,
> 
> Please consider applying.

Sorry, for the noise, but the patch was incomplete, as there was another call to
sleep_on() in the same file. Fixed below, please consider applying.

Description: Remove deprecated interruptible_sleep_on_timeout() function calls
and replace with direct wait-queue usage.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.11-rc2-kj-v/arch/ppc/4xx_io/serial_sicc.c	2005-01-24 09:34:02.000000000 -0800
+++ 2.6.11-rc2-kj/arch/ppc/4xx_io/serial_sicc.c	2005-02-02 15:04:20.000000000 -0800
@@ -52,6 +52,7 @@
 #include <linux/console.h>
 #include <linux/sysrq.h>
 #include <linux/bitops.h>
+#include <linux/wait.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -1561,8 +1562,11 @@ static int block_til_ready(struct tty_st
      */
     if (tty_hung_up_p(filp) ||
         (info->flags & ASYNC_CLOSING)) {
-        if (info->flags & ASYNC_CLOSING)
-            interruptible_sleep_on(&info->close_wait);
+        if (info->flags & ASYNC_CLOSING) {
+            prepare_to_wait(&info->close_wait, &wait, TASK_INTERRUPTIBLE);
+            schedule();
+            finish_wait(&info->close_wait, &wait);
+        }
         return (info->flags & ASYNC_HUP_NOTIFY) ?
             -EAGAIN : -ERESTARTSYS;
     }
@@ -1664,6 +1668,7 @@ static struct SICC_info *siccuart_get(in
 
 static int siccuart_open(struct tty_struct *tty, struct file *filp)
 {
+    DEFINE_WAIT(wait);
     struct SICC_info *info;
     int retval, line = tty->index;
 
@@ -1699,8 +1704,11 @@ static int siccuart_open(struct tty_stru
      */
     if (tty_hung_up_p(filp) ||
         (info->flags & ASYNC_CLOSING)) {
-        if (info->flags & ASYNC_CLOSING)
-            interruptible_sleep_on(&info->close_wait);
+        if (info->flags & ASYNC_CLOSING) {
+            prepare_to_wait(&info->close_wait, &wait, TASK_INTERRUPTIBLE);
+            schedule();
+            finish_wait(&info->close_wait, &wait);
+        }
         return -EAGAIN;
     }
 

      reply	other threads:[~2005-02-02 23:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-02 22:55 [PATCH 18/20] ppc/serial_sicc: remove interruptible_sleep_on_timeout() usage Nishanth Aravamudan
2005-02-02 23:05 ` Nishanth Aravamudan [this message]

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=20050202230515.GZ2546@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=mporter@kernel.crashing.org \
    /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;
as well as URLs for NNTP newsgroup(s).