Skip to contentSkip to conversation

ppc/serial_sicc: remove

PATCH In review Nishanth Aravamudan 1 participant 2 messages Feb 2, 2005 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 18/20 ppc/serial_sicc: remove

Hello,

Please consider applying.

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

arch/ppc/4xx_io/serial_sicc.c +6 -2
@@ -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;
     }

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw

PATCH 18/20 ppc/serial_sicc: remove

Quoted 3 lines · Nishanth Aravamudan

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.

arch/ppc/4xx_io/serial_sicc.c +12 -4
@@ -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;
     }
 

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors