netdev
[Top] [All Lists]

[PATCH 5 of 5][ATM]: replace schedule_timeout() with msleep()

To: netdev@xxxxxxxxxxx
Subject: [PATCH 5 of 5][ATM]: replace schedule_timeout() with msleep()
From: "chas williams - CONTRACTOR" <chas@xxxxxxxxxxxxxxxx>
Date: Wed, 26 Jan 2005 11:58:11 -0500
Cc: davem@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
please apply to 2.6

thanks!

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/01/24 13:38:44-05:00 chas@xxxxxxxxxxxxxxxxxxxxxx 
#   [ATM]: replace schedule_timeout() with msleep()
#   
#     Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
#     Signed-off-by: Chas Williams <chas@xxxxxxxxxxxxxxxx>
# 
# net/atm/resources.c
#   2005/01/24 13:38:27-05:00 chas@xxxxxxxxxxxxxxxxxxxxxx +2 -2
#   [ATM]: replace schedule_timeout() with msleep()
#   
#     Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
#     Signed-off-by: Chas Williams <chas@xxxxxxxxxxxxxxxx>
# 
diff -Nru a/net/atm/resources.c b/net/atm/resources.c
--- a/net/atm/resources.c       2005-01-25 09:37:57 -05:00
+++ b/net/atm/resources.c       2005-01-25 09:37:57 -05:00
@@ -16,6 +16,7 @@
 #include <linux/kernel.h> /* for barrier */
 #include <linux/module.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 #include <net/sock.h>   /* for struct sock */
 
 #include "common.h"
@@ -139,8 +140,7 @@
 
         warning_time = jiffies;
         while (atomic_read(&dev->refcnt) != 1) {
-                current->state = TASK_INTERRUPTIBLE;
-                schedule_timeout(HZ / 4);
+                msleep(250);
                 if ((jiffies - warning_time) > 10 * HZ) {
                         printk(KERN_EMERG "atm_dev_deregister: waiting for "
                                "dev %d to become free. Usage count = %d\n",

<Prev in Thread] Current Thread [Next in Thread>