diff options
-rw-r--r-- | drivers/ide/ide-cd.c | 14 | ||||
-rw-r--r-- | drivers/ide/ide-cd.h | 1 |
2 files changed, 3 insertions, 12 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 */ | ||
192 | void 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 | |||
201 | static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense, | 191 | static 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; |
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h index df01cfd797cf..fe0ea36e4124 100644 --- a/drivers/ide/ide-cd.h +++ b/drivers/ide/ide-cd.h | |||
@@ -143,7 +143,6 @@ struct cdrom_info { | |||
143 | void ide_cd_log_error(const char *, struct request *, struct request_sense *); | 143 | void ide_cd_log_error(const char *, struct request *, struct request_sense *); |
144 | 144 | ||
145 | /* ide-cd.c functions used by ide-cd_ioctl.c */ | 145 | /* ide-cd.c functions used by ide-cd_ioctl.c */ |
146 | void ide_cd_init_rq(ide_drive_t *, struct request *); | ||
147 | int ide_cd_queue_pc(ide_drive_t *, const unsigned char *, int, void *, | 146 | int ide_cd_queue_pc(ide_drive_t *, const unsigned char *, int, void *, |
148 | unsigned *, struct request_sense *, int, unsigned int); | 147 | unsigned *, struct request_sense *, int, unsigned int); |
149 | int ide_cd_read_toc(ide_drive_t *, struct request_sense *); | 148 | int ide_cd_read_toc(ide_drive_t *, struct request_sense *); |