[ide] ide-cd: use ssleep() instead of schedule_timeout()

Description: Uses ssleep() in place of cdrom_sleep() to guarantee the task
delays as expected. Remove cdrom_sleep() definition, as this is the only place
where it is called.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Acked-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 812ab7f3
...@@ -1464,19 +1464,6 @@ static ide_startstop_t cdrom_do_packet_command (ide_drive_t *drive) ...@@ -1464,19 +1464,6 @@ static ide_startstop_t cdrom_do_packet_command (ide_drive_t *drive)
} }
/* Sleep for TIME jiffies.
Not to be called from an interrupt handler. */
static
void cdrom_sleep (int time)
{
int sleep = time;
do {
set_current_state(TASK_INTERRUPTIBLE);
sleep = schedule_timeout(sleep);
} while (sleep);
}
static static
int cdrom_queue_packet_command(ide_drive_t *drive, struct request *rq) int cdrom_queue_packet_command(ide_drive_t *drive, struct request *rq)
{ {
...@@ -1511,7 +1498,7 @@ int cdrom_queue_packet_command(ide_drive_t *drive, struct request *rq) ...@@ -1511,7 +1498,7 @@ int cdrom_queue_packet_command(ide_drive_t *drive, struct request *rq)
/* The drive is in the process of loading /* The drive is in the process of loading
a disk. Retry, but wait a little to give a disk. Retry, but wait a little to give
the drive time to complete the load. */ the drive time to complete the load. */
cdrom_sleep(2 * HZ); ssleep(2);
} else { } else {
/* Otherwise, don't retry. */ /* Otherwise, don't retry. */
retries = 0; retries = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment