please apply to 2.6.
thanks!
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/02/03 11:38:49-05:00 chas@xxxxxxxxxxxxxxxxxxxxxx
# [ATM]: [horizon] replace interruptible_sleep_on() with
wait_event_interruptible()
#
# Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
# Signed-off-by: Chas Williams <chas@xxxxxxxxxxxxxxxx>
#
# drivers/atm/horizon.c
# 2005/02/03 11:38:31-05:00 chas@xxxxxxxxxxxxxxxxxxxxxx +6 -7
# [ATM]: [horizon] replace interruptible_sleep_on() with
wait_event_interruptible()
#
# Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
# Signed-off-by: Chas Williams <chas@xxxxxxxxxxxxxxxx>
#
diff -Nru a/drivers/atm/horizon.c b/drivers/atm/horizon.c
--- a/drivers/atm/horizon.c 2005-02-03 12:17:39 -05:00
+++ b/drivers/atm/horizon.c 2005-02-03 12:17:39 -05:00
@@ -39,6 +39,7 @@
#include <linux/uio.h>
#include <linux/init.h>
#include <linux/ioport.h>
+#include <linux/wait.h>
#include <asm/system.h>
#include <asm/io.h>
@@ -1089,13 +1090,11 @@
/********** (queue to) become the next TX thread **********/
static inline int tx_hold (hrz_dev * dev) {
- while (test_and_set_bit (tx_busy, &dev->flags)) {
- PRINTD (DBG_TX, "sleeping at tx lock %p %lu", dev, dev->flags);
- interruptible_sleep_on (&dev->tx_queue);
- PRINTD (DBG_TX, "woken at tx lock %p %lu", dev, dev->flags);
- if (signal_pending (current))
- return -1;
- }
+ PRINTD (DBG_TX, "sleeping at tx lock %p %lu", dev, dev->flags);
+ wait_event_interruptible(dev->tx_queue, (!test_and_set_bit(tx_busy,
&dev->flags)));
+ PRINTD (DBG_TX, "woken at tx lock %p %lu", dev, dev->flags);
+ if (signal_pending (current))
+ return -1;
PRINTD (DBG_TX, "set tx_busy for dev %p", dev);
return 0;
}
|