[PATCH 1/5] sonypi: replace schedule_timeout() with msleep()

From: Stelian Pop
Date: Thu Feb 10 2005 - 10:45:48 EST


===================================================================

Replace schedule_timeout() with msleep() - from janitors.

Signed-off-by: Stelian Pop <stelian@xxxxxxxxxx>

===================================================================

sonypi.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)

===================================================================

Index: drivers/char/sonypi.c
===================================================================
--- a/drivers/char/sonypi.c (revision 26538)
+++ b/drivers/char/sonypi.c (revision 26539)
@@ -1,7 +1,7 @@
/*
* Sony Programmable I/O Control Device driver for VAIO
*
- * Copyright (C) 2001-2004 Stelian Pop <stelian@xxxxxxxxxx>
+ * Copyright (C) 2001-2005 Stelian Pop <stelian@xxxxxxxxxx>
*
* Copyright (C) 2001-2002 Alcôve <www.alcove.com>
*
@@ -286,17 +286,14 @@ static void sonypi_camera_on(void)

for (j = 5; j > 0; j--) {

- while (sonypi_call2(0x91, 0x1)) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
- }
+ while (sonypi_call2(0x91, 0x1))
+ msleep(10);
sonypi_call1(0x93);

for (i = 400; i > 0; i--) {
if (sonypi_camera_ready())
break;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ msleep(10);
}
if (i)
break;
--
Stelian Pop <stelian@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/