aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-04-29 08:37:52 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-04-29 08:48:55 -0400
commitd34c87e4ba3d1857f80a65179e81a18705a31656 (patch)
tree6460d4a1de0c2e26ab9eed6babc916092eed4559 /drivers/ide/ide-cd.c
parente7b241a7715d2a0885f779f5baa63711d71b1d75 (diff)
block: replace sizeof(rq->cmd) with BLK_MAX_CDB
This is a preparation for changing rq->cmd from the static array to a pointer. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Boaz Harrosh <bharrosh@panasas.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index fe9df38f62cc..68e7f19dc036 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -782,7 +782,7 @@ static ide_startstop_t cdrom_start_seek_continuation(ide_drive_t *drive)
782 782
783 sector_div(frame, queue_hardsect_size(drive->queue) >> SECTOR_BITS); 783 sector_div(frame, queue_hardsect_size(drive->queue) >> SECTOR_BITS);
784 784
785 memset(rq->cmd, 0, sizeof(rq->cmd)); 785 memset(rq->cmd, 0, BLK_MAX_CDB);
786 rq->cmd[0] = GPCMD_SEEK; 786 rq->cmd[0] = GPCMD_SEEK;
787 put_unaligned(cpu_to_be32(frame), (unsigned int *) &rq->cmd[2]); 787 put_unaligned(cpu_to_be32(frame), (unsigned int *) &rq->cmd[2]);
788 788
@@ -1694,7 +1694,7 @@ static int ide_cdrom_prep_fs(struct request_queue *q, struct request *rq)
1694 long block = (long)rq->hard_sector / (hard_sect >> 9); 1694 long block = (long)rq->hard_sector / (hard_sect >> 9);
1695 unsigned long blocks = rq->hard_nr_sectors / (hard_sect >> 9); 1695 unsigned long blocks = rq->hard_nr_sectors / (hard_sect >> 9);
1696 1696
1697 memset(rq->cmd, 0, sizeof(rq->cmd)); 1697 memset(rq->cmd, 0, BLK_MAX_CDB);
1698 1698
1699 if (rq_data_dir(rq) == READ) 1699 if (rq_data_dir(rq) == READ)
1700 rq->cmd[0] = GPCMD_READ_10; 1700 rq->cmd[0] = GPCMD_READ_10;