aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-07-15 15:21:45 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:45 -0400
commited820f19521de246c5b7978f8f78290733a55b20 (patch)
tree3019fb02e4aa2f9acf150c2792bdaa6b096a4f53 /drivers/ide/ide-cd.c
parent124cafc5eb973e748c4ce3dc1caad29274e64613 (diff)
ide-cd: remove ide_cd_init_rq
ide_cd_init_rq is not used by ide-cd_ioctl any more. Only cdrom_queue_request_sense use it. This converts cdrom_queue_request_sense to use blk_rq_init directly and removes ide_cd_init_rq. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 7917cd576446..ac542ffffa49 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -188,16 +188,6 @@ static void cdrom_analyze_sense_data(ide_drive_t *drive,
188 ide_cd_log_error(drive->name, failed_command, sense); 188 ide_cd_log_error(drive->name, failed_command, sense);
189} 189}
190 190
191/* Initialize a ide-cd packet command request */
192void ide_cd_init_rq(ide_drive_t *drive, struct request *rq)
193{
194 struct cdrom_info *cd = drive->driver_data;
195
196 blk_rq_init(NULL, rq);
197 rq->cmd_type = REQ_TYPE_ATA_PC;
198 rq->rq_disk = cd->disk;
199}
200
201static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense, 191static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
202 struct request *failed_command) 192 struct request *failed_command)
203{ 193{
@@ -208,7 +198,9 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
208 sense = &info->sense_data; 198 sense = &info->sense_data;
209 199
210 /* stuff the sense request in front of our current request */ 200 /* stuff the sense request in front of our current request */
211 ide_cd_init_rq(drive, rq); 201 blk_rq_init(NULL, rq);
202 rq->cmd_type = REQ_TYPE_ATA_PC;
203 rq->rq_disk = info->disk;
212 204
213 rq->data = sense; 205 rq->data = sense;
214 rq->cmd[0] = GPCMD_REQUEST_SENSE; 206 rq->cmd[0] = GPCMD_REQUEST_SENSE;