aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-12-29 14:27:31 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-12-29 14:27:31 -0500
commit3c8a2cce47c6813383c9e38134e31f7e5f72e9d8 (patch)
tree0779139e88629fe3434fbef6abdb43c78df0ce54 /drivers/ide/ide-cd.c
parenta72b2147ec9e77be68308ba06190603550d1cb61 (diff)
ide: ide_lock + __blk_end_request() -> blk_end_request()
Use blk_end_request() instead of ide_lock + __blk_end_request() in cdrom_end_request(), cdrom_newpc_intr(), __ide_end_request(), ide_complete_pm_request() and ide_end_drive_cmd(). [ ide_lock is currently also used as queue lock ] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 31f398577ed4..ac607bbde45c 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -262,7 +262,6 @@ static void cdrom_end_request(ide_drive_t *drive, int uptodate)
262 struct request *failed = (struct request *) rq->buffer; 262 struct request *failed = (struct request *) rq->buffer;
263 struct cdrom_info *info = drive->driver_data; 263 struct cdrom_info *info = drive->driver_data;
264 void *sense = &info->sense_data; 264 void *sense = &info->sense_data;
265 unsigned long flags;
266 265
267 if (failed) { 266 if (failed) {
268 if (failed->sense) { 267 if (failed->sense) {
@@ -278,11 +277,9 @@ static void cdrom_end_request(ide_drive_t *drive, int uptodate)
278 failed->hard_nr_sectors)) 277 failed->hard_nr_sectors))
279 BUG(); 278 BUG();
280 } else { 279 } else {
281 spin_lock_irqsave(&ide_lock, flags); 280 if (blk_end_request(failed, -EIO,
282 if (__blk_end_request(failed, -EIO, 281 failed->data_len))
283 failed->data_len))
284 BUG(); 282 BUG();
285 spin_unlock_irqrestore(&ide_lock, flags);
286 } 283 }
287 } else 284 } else
288 cdrom_analyze_sense_data(drive, NULL, sense); 285 cdrom_analyze_sense_data(drive, NULL, sense);
@@ -1151,16 +1148,13 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
1151 1148
1152end_request: 1149end_request:
1153 if (blk_pc_request(rq)) { 1150 if (blk_pc_request(rq)) {
1154 unsigned long flags;
1155 unsigned int dlen = rq->data_len; 1151 unsigned int dlen = rq->data_len;
1156 1152
1157 if (dma) 1153 if (dma)
1158 rq->data_len = 0; 1154 rq->data_len = 0;
1159 1155
1160 spin_lock_irqsave(&ide_lock, flags); 1156 if (blk_end_request(rq, 0, dlen))
1161 if (__blk_end_request(rq, 0, dlen))
1162 BUG(); 1157 BUG();
1163 spin_unlock_irqrestore(&ide_lock, flags);
1164 1158
1165 hwgroup->rq = NULL; 1159 hwgroup->rq = NULL;
1166 } else { 1160 } else {