Skip to content

Commit

Permalink
[PATCH] drivers/cdrom: fix-up schedule_timeout() usage
Browse files Browse the repository at this point in the history
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>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Nishanth Aravamudan authored and Linus Torvalds committed Sep 10, 2005
1 parent 86e8486 commit 2ddee1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions drivers/cdrom/sbpcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_timeout_interruptible(time);
sti();
}
/*==========================================================================*/
Expand Down
3 changes: 1 addition & 2 deletions drivers/cdrom/sonycd535.c
Original file line number Diff line number Diff line change
Expand Up @@ -1478,8 +1478,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? */
Expand Down

0 comments on commit 2ddee1b

Please sign in to comment.