[PATCH] 8139too: remove interruptible_sleep_on_timeout() usage From: Nishanth Aravamudan One thing I would have preferred using here is use wait_event*(), but there is no condition. However, try_to_freeze(PF_FREEZE) could be used as one, if the return condition matters -- it can return 0 or 1, from what I understand. If the intent is to loop until the task is "frozen", then I can revise the patch to use wait_event_interruptible_timeout(). Replace deprecated interruptible_sleep_on_timeout() function calls with direct wait-queue usage. I did not find direct wake_up_interruptible() function call in this file for the wait-queue, but that may not be an issue. Patch is compile-tested. Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer Signed-off-by: Alexey Dobriyan Index: linux-kj/drivers/net/8139too.c =================================================================== --- linux-kj.orig/drivers/net/8139too.c 2005-09-21 01:19:07.000000000 +0400 +++ linux-kj/drivers/net/8139too.c 2005-09-21 01:23:12.000000000 +0400 @@ -108,6 +108,7 @@ #include #include #include +#include #include #include #include @@ -1594,6 +1595,7 @@ static inline void rtl8139_thread_iter ( static int rtl8139_thread (void *data) { + DEFINE_WAIT(wait); struct net_device *dev = data; struct rtl8139_private *tp = netdev_priv(dev); unsigned long timeout; @@ -1604,7 +1606,9 @@ static int rtl8139_thread (void *data) while (1) { timeout = next_tick; do { - timeout = interruptible_sleep_on_timeout (&tp->thr_wait, timeout); + prepare_to_wait(&tp->thr_wait, &wait, TASK_INTERRUPTIBLE); + timeout = schedule_timeout(timeout); + finish_wait(&tp->thr_wait, &wait); /* make swsusp happy with our thread */ try_to_freeze(); } while (!signal_pending (current) && (timeout > 0));