diff options
author | Tejun Heo <tj@kernel.org> | 2009-05-07 09:24:40 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-11 03:50:54 -0400 |
commit | 9780e2dd8254351f6cbe11304849126b51dbd561 (patch) | |
tree | a987a9d671302f4a5133cbf1d7880158a9f21315 /drivers/ide/ide-disk.c | |
parent | 83096ebf1263b2c1ee5e653ba37d993d02e3eb7b (diff) |
ide: convert to rq pos and nr_sectors accessors
ide doesn't manipulate request fields anymore and thus all hard and
their soft equivalents are always equal. Convert all references to
accessors.
[ Impact: use pos and nr_sectors accessors ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index c2438804d3c4..ad18e14043c5 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -82,7 +82,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
82 | sector_t block) | 82 | sector_t block) |
83 | { | 83 | { |
84 | ide_hwif_t *hwif = drive->hwif; | 84 | ide_hwif_t *hwif = drive->hwif; |
85 | u16 nsectors = (u16)rq->nr_sectors; | 85 | u16 nsectors = (u16)blk_rq_sectors(rq); |
86 | u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48); | 86 | u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48); |
87 | u8 dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA); | 87 | u8 dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA); |
88 | struct ide_cmd cmd; | 88 | struct ide_cmd cmd; |
@@ -90,7 +90,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
90 | ide_startstop_t rc; | 90 | ide_startstop_t rc; |
91 | 91 | ||
92 | if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && lba48 && dma) { | 92 | if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && lba48 && dma) { |
93 | if (block + rq->nr_sectors > 1ULL << 28) | 93 | if (block + blk_rq_sectors(rq) > 1ULL << 28) |
94 | dma = 0; | 94 | dma = 0; |
95 | else | 95 | else |
96 | lba48 = 0; | 96 | lba48 = 0; |
@@ -195,9 +195,9 @@ static ide_startstop_t ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
195 | 195 | ||
196 | ledtrig_ide_activity(); | 196 | ledtrig_ide_activity(); |
197 | 197 | ||
198 | pr_debug("%s: %sing: block=%llu, sectors=%lu, buffer=0x%08lx\n", | 198 | pr_debug("%s: %sing: block=%llu, sectors=%u, buffer=0x%08lx\n", |
199 | drive->name, rq_data_dir(rq) == READ ? "read" : "writ", | 199 | drive->name, rq_data_dir(rq) == READ ? "read" : "writ", |
200 | (unsigned long long)block, rq->nr_sectors, | 200 | (unsigned long long)block, blk_rq_sectors(rq), |
201 | (unsigned long)rq->buffer); | 201 | (unsigned long)rq->buffer); |
202 | 202 | ||
203 | if (hwif->rw_disk) | 203 | if (hwif->rw_disk) |