lkml.org 
[lkml]   [2005]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[-mm PATCH 17/32] drivers/cdrom: fix-up schedule_timeout() usage
Description: Use schedule_timeout_{un,}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

---

drivers/cdrom/sbpcd.c | 3 +--
drivers/cdrom/sonycd535.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)

diff -urpN 2.6.13-rc5-mm1/drivers/cdrom/sbpcd.c 2.6.13-rc5-mm1-dev/drivers/cdrom/sbpcd.c
--- 2.6.13-rc5-mm1/drivers/cdrom/sbpcd.c 2005-08-07 10:05:20.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/cdrom/sbpcd.c 2005-08-08 14:18:39.000000000 -0700
@@ -827,8 +827,7 @@ static void mark_timeout_audio(u_long i)
static void sbp_sleep(u_int time)
{
sti();
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(time);
+ schedule_interruptible_timeout(time);
sti();
}
/*==========================================================================*/
diff -urpN 2.6.13-rc5-mm1/drivers/cdrom/sonycd535.c 2.6.13-rc5-mm1-dev/drivers/cdrom/sonycd535.c
--- 2.6.13-rc5-mm1/drivers/cdrom/sonycd535.c 2005-08-07 09:57:49.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/cdrom/sonycd535.c 2005-08-12 13:30:50.000000000 -0700
@@ -1478,8 +1477,7 @@ static int __init sony535_init(void)
/* look for the CD-ROM, follows the procedure in the DOS driver */
inb(select_unit_reg);
/* wait for 40 18 Hz ticks (reverse-engineered from DOS driver) */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout((HZ+17)*40/18);
+ schedule_timeout_interruptible((HZ+17)*40/18);
inb(result_reg);

outb(0, read_status_reg); /* does a reset? */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-15 20:21    [W:0.190 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site