aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:34 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:34 -0400
commitf025ffdcc3450ae66c9d5df368d97f07e7fcf489 (patch)
tree73420868781e7d0fa27bca6b9ee35983059fa19d /drivers/ide/ide-tape.c
parentd56c99e26b0ff45009bdf85556abee60591507cb (diff)
ide-tape: remove idetape_init_rq()
idetape_init_rq() is only used in idetape_queue_pc_head() so inline it there. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 7f56f2003342..83014abf330f 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -689,13 +689,6 @@ static void idetape_create_request_sense_cmd(struct ide_atapi_pc *pc)
689 pc->req_xfer = 20; 689 pc->req_xfer = 20;
690} 690}
691 691
692static void idetape_init_rq(struct request *rq, u8 cmd)
693{
694 blk_rq_init(NULL, rq);
695 rq->cmd_type = REQ_TYPE_SPECIAL;
696 rq->cmd[13] = cmd;
697}
698
699/* 692/*
700 * Generate a new packet command request in front of the request queue, before 693 * Generate a new packet command request in front of the request queue, before
701 * the current request, so that it will be processed immediately, on the next 694 * the current request, so that it will be processed immediately, on the next
@@ -716,11 +709,13 @@ static void idetape_queue_pc_head(ide_drive_t *drive, struct ide_atapi_pc *pc,
716{ 709{
717 struct ide_tape_obj *tape = drive->driver_data; 710 struct ide_tape_obj *tape = drive->driver_data;
718 711
719 idetape_init_rq(rq, REQ_IDETAPE_PC1); 712 blk_rq_init(NULL, rq);
713 rq->cmd_type = REQ_TYPE_SPECIAL;
720 rq->cmd_flags |= REQ_PREEMPT; 714 rq->cmd_flags |= REQ_PREEMPT;
721 rq->buffer = (char *) pc; 715 rq->buffer = (char *) pc;
722 rq->rq_disk = tape->disk; 716 rq->rq_disk = tape->disk;
723 memcpy(rq->cmd, pc->c, 12); 717 memcpy(rq->cmd, pc->c, 12);
718 rq->cmd[13] = REQ_IDETAPE_PC1;
724 ide_do_drive_cmd(drive, rq); 719 ide_do_drive_cmd(drive, rq);
725} 720}
726 721