ChangeSet 1.2181.4.23, 2005/03/17 18:12:55-08:00, [EMAIL PROTECTED]
[PATCH] usb/rio500: remove interruptible_sleep_on_timeout() usage
Replace deprecated interruptible_sleep_on_timeout() with direct
wait-queue usage. Patch is compile-tested.
Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
rio500.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff -Nru a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c
--- a/drivers/usb/misc/rio500.c 2005-03-30 15:09:00 -08:00
+++ b/drivers/usb/misc/rio500.c 2005-03-30 15:09:00 -08:00
@@ -40,6 +40,7 @@
#include <linux/spinlock.h>
#include <linux/usb.h>
#include <linux/smp_lock.h>
+#include <linux/wait.h>
#include "rio500_usb.h"
@@ -264,6 +265,7 @@
write_rio(struct file *file, const char __user *buffer,
size_t count, loff_t * ppos)
{
+ DEFINE_WAIT(wait);
struct rio_usb_data *rio = &rio_instance;
unsigned long copy_size;
@@ -319,7 +321,9 @@
errn = -ETIME;
goto error;
}
- interruptible_sleep_on_timeout(&rio-> wait_q,
NAK_TIMEOUT);
+ prepare_to_wait(&rio->wait_q, &wait,
TASK_INTERRUPTIBLE);
+ schedule_timeout(NAK_TIMEOUT);
+ finish_wait(&rio->wait_q, &wait);
continue;
} else if (!result && partial) {
obuf += partial;
@@ -349,6 +353,7 @@
static ssize_t
read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos)
{
+ DEFINE_WAIT(wait);
struct rio_usb_data *rio = &rio_instance;
ssize_t read_count;
unsigned int partial;
@@ -399,8 +404,9 @@
err("read_rio: maxretry timeout");
return -ETIME;
}
- interruptible_sleep_on_timeout(&rio->wait_q,
- NAK_TIMEOUT);
+ prepare_to_wait(&rio->wait_q, &wait,
TASK_INTERRUPTIBLE);
+ schedule_timeout(NAK_TIMEOUT);
+ finish_wait(&rio->wait_q, &wait);
continue;
} else if (result != -EREMOTEIO) {
up(&(rio->lock));
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html