diff options
Diffstat (limited to 'drivers/cdrom')
-rw-r--r-- | drivers/cdrom/gdrom.c | 6 | ||||
-rw-r--r-- | drivers/cdrom/viocd.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index cab2b1fb2fe7..488423cab51a 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c | |||
@@ -584,8 +584,8 @@ static void gdrom_readdisk_dma(struct work_struct *work) | |||
584 | list_for_each_safe(elem, next, &gdrom_deferred) { | 584 | list_for_each_safe(elem, next, &gdrom_deferred) { |
585 | req = list_entry(elem, struct request, queuelist); | 585 | req = list_entry(elem, struct request, queuelist); |
586 | spin_unlock(&gdrom_lock); | 586 | spin_unlock(&gdrom_lock); |
587 | block = req->sector/GD_TO_BLK + GD_SESSION_OFFSET; | 587 | block = blk_rq_pos(req)/GD_TO_BLK + GD_SESSION_OFFSET; |
588 | block_cnt = req->nr_sectors/GD_TO_BLK; | 588 | block_cnt = blk_rq_sectors(req)/GD_TO_BLK; |
589 | ctrl_outl(PHYSADDR(req->buffer), GDROM_DMA_STARTADDR_REG); | 589 | ctrl_outl(PHYSADDR(req->buffer), GDROM_DMA_STARTADDR_REG); |
590 | ctrl_outl(block_cnt * GDROM_HARD_SECTOR, GDROM_DMA_LENGTH_REG); | 590 | ctrl_outl(block_cnt * GDROM_HARD_SECTOR, GDROM_DMA_LENGTH_REG); |
591 | ctrl_outl(1, GDROM_DMA_DIRECTION_REG); | 591 | ctrl_outl(1, GDROM_DMA_DIRECTION_REG); |
@@ -661,7 +661,7 @@ static void gdrom_request(struct request_queue *rq) | |||
661 | printk(" write request ignored\n"); | 661 | printk(" write request ignored\n"); |
662 | __blk_end_request_cur(req, -EIO); | 662 | __blk_end_request_cur(req, -EIO); |
663 | } | 663 | } |
664 | if (req->nr_sectors) | 664 | if (blk_rq_sectors(req)) |
665 | gdrom_request_handler_dma(req); | 665 | gdrom_request_handler_dma(req); |
666 | else | 666 | else |
667 | __blk_end_request_cur(req, -EIO); | 667 | __blk_end_request_cur(req, -EIO); |
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index cc3efa096e1a..6e190a93d8df 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -282,7 +282,7 @@ static int send_request(struct request *req) | |||
282 | viopath_targetinst(viopath_hostLp), | 282 | viopath_targetinst(viopath_hostLp), |
283 | (u64)req, VIOVERSION << 16, | 283 | (u64)req, VIOVERSION << 16, |
284 | ((u64)DEVICE_NR(diskinfo) << 48) | dmaaddr, | 284 | ((u64)DEVICE_NR(diskinfo) << 48) | dmaaddr, |
285 | (u64)req->sector * 512, len, 0); | 285 | (u64)blk_rq_pos(req) * 512, len, 0); |
286 | if (hvrc != HvLpEvent_Rc_Good) { | 286 | if (hvrc != HvLpEvent_Rc_Good) { |
287 | printk(VIOCD_KERN_WARNING "hv error on op %d\n", (int)hvrc); | 287 | printk(VIOCD_KERN_WARNING "hv error on op %d\n", (int)hvrc); |
288 | return -1; | 288 | return -1; |