aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 8bbe222c5e42..182320dd6ea1 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -730,7 +730,7 @@ out_end:
730 if (blk_pc_request(rq)) 730 if (blk_pc_request(rq))
731 nsectors = (rq->data_len + 511) >> 9; 731 nsectors = (rq->data_len + 511) >> 9;
732 else 732 else
733 nsectors = rq->hard_nr_sectors; 733 nsectors = blk_rq_sectors(rq);
734 734
735 if (nsectors == 0) 735 if (nsectors == 0)
736 nsectors = 1; 736 nsectors = 1;
@@ -875,7 +875,7 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
875 875
876 return ide_issue_pc(drive, &cmd); 876 return ide_issue_pc(drive, &cmd);
877out_end: 877out_end:
878 nsectors = rq->hard_nr_sectors; 878 nsectors = blk_rq_sectors(rq);
879 879
880 if (nsectors == 0) 880 if (nsectors == 0)
881 nsectors = 1; 881 nsectors = 1;
@@ -1359,8 +1359,8 @@ static int ide_cdrom_probe_capabilities(ide_drive_t *drive)
1359static int ide_cdrom_prep_fs(struct request_queue *q, struct request *rq) 1359static int ide_cdrom_prep_fs(struct request_queue *q, struct request *rq)
1360{ 1360{
1361 int hard_sect = queue_hardsect_size(q); 1361 int hard_sect = queue_hardsect_size(q);
1362 long block = (long)rq->hard_sector / (hard_sect >> 9); 1362 long block = (long)blk_rq_pos(rq) / (hard_sect >> 9);
1363 unsigned long blocks = rq->hard_nr_sectors / (hard_sect >> 9); 1363 unsigned long blocks = blk_rq_sectors(rq) / (hard_sect >> 9);
1364 1364
1365 memset(rq->cmd, 0, BLK_MAX_CDB); 1365 memset(rq->cmd, 0, BLK_MAX_CDB);
1366 1366