aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-07-15 15:21:44 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:44 -0400
commit124cafc5eb973e748c4ce3dc1caad29274e64613 (patch)
treeaba8bd1322d15a80a92711980d7c89f702ea7703
parent5f2e1ceef45ac07d7c52d16de2531a56c453bb0f (diff)
ide: remove ide_init_drive_cmd
ide_init_drive_cmd just calls blk_rq_init. This converts the users of ide_init_drive_cmd to use blk_rq_init directly and removes ide_init_drive_cmd. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-cd.c2
-rw-r--r--drivers/ide/ide-floppy.c2
-rw-r--r--drivers/ide/ide-io.c17
-rw-r--r--drivers/scsi/ide-scsi.c4
-rw-r--r--include/linux/ide.h2
5 files changed, 4 insertions, 23 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 792a3cf73d6e..7917cd576446 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -193,7 +193,7 @@ void ide_cd_init_rq(ide_drive_t *drive, struct request *rq)
193{ 193{
194 struct cdrom_info *cd = drive->driver_data; 194 struct cdrom_info *cd = drive->driver_data;
195 195
196 ide_init_drive_cmd(rq); 196 blk_rq_init(NULL, rq);
197 rq->cmd_type = REQ_TYPE_ATA_PC; 197 rq->cmd_type = REQ_TYPE_ATA_PC;
198 rq->rq_disk = cd->disk; 198 rq->rq_disk = cd->disk;
199} 199}
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index b10e9a813cde..9161cd92a842 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -286,7 +286,7 @@ static void idefloppy_queue_pc_head(ide_drive_t *drive, struct ide_atapi_pc *pc,
286{ 286{
287 struct ide_floppy_obj *floppy = drive->driver_data; 287 struct ide_floppy_obj *floppy = drive->driver_data;
288 288
289 ide_init_drive_cmd(rq); 289 blk_rq_init(NULL, rq);
290 rq->buffer = (char *) pc; 290 rq->buffer = (char *) pc;
291 rq->cmd_type = REQ_TYPE_SPECIAL; 291 rq->cmd_type = REQ_TYPE_SPECIAL;
292 rq->cmd_flags |= REQ_PREEMPT; 292 rq->cmd_flags |= REQ_PREEMPT;
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 29f5cc863f6e..d8b4d9f81ae2 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1539,23 +1539,6 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1539} 1539}
1540 1540
1541/** 1541/**
1542 * ide_init_drive_cmd - initialize a drive command request
1543 * @rq: request object
1544 *
1545 * Initialize a request before we fill it in and send it down to
1546 * ide_do_drive_cmd. Commands must be set up by this function. Right
1547 * now it doesn't do a lot, but if that changes abusers will have a
1548 * nasty surprise.
1549 */
1550
1551void ide_init_drive_cmd (struct request *rq)
1552{
1553 blk_rq_init(NULL, rq);
1554}
1555
1556EXPORT_SYMBOL(ide_init_drive_cmd);
1557
1558/**
1559 * ide_do_drive_cmd - issue IDE special command 1542 * ide_do_drive_cmd - issue IDE special command
1560 * @drive: device to issue command 1543 * @drive: device to issue command
1561 * @rq: request to issue 1544 * @rq: request to issue
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 89ecf0132191..da261806d62a 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -228,7 +228,7 @@ static int idescsi_check_condition(ide_drive_t *drive,
228 kfree(pc); 228 kfree(pc);
229 return -ENOMEM; 229 return -ENOMEM;
230 } 230 }
231 ide_init_drive_cmd(rq); 231 blk_rq_init(NULL, rq);
232 rq->special = (char *) pc; 232 rq->special = (char *) pc;
233 pc->rq = rq; 233 pc->rq = rq;
234 pc->buf = buf; 234 pc->buf = buf;
@@ -786,7 +786,7 @@ static int idescsi_queue (struct scsi_cmnd *cmd,
786 } 786 }
787 } 787 }
788 788
789 ide_init_drive_cmd (rq); 789 blk_rq_init(NULL, rq);
790 rq->special = (char *) pc; 790 rq->special = (char *) pc;
791 rq->cmd_type = REQ_TYPE_SPECIAL; 791 rq->cmd_type = REQ_TYPE_SPECIAL;
792 spin_unlock_irq(host->host_lock); 792 spin_unlock_irq(host->host_lock);
diff --git a/include/linux/ide.h b/include/linux/ide.h
index eddb6daadf4a..3261c6691759 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -857,8 +857,6 @@ int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long);
857 857
858extern ide_startstop_t ide_do_reset (ide_drive_t *); 858extern ide_startstop_t ide_do_reset (ide_drive_t *);
859 859
860extern void ide_init_drive_cmd (struct request *rq);
861
862/* 860/*
863 * "action" parameter type for ide_do_drive_cmd() below. 861 * "action" parameter type for ide_do_drive_cmd() below.
864 */ 862 */