summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 20:13:13 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 20:13:13 +0100
commit7267c3377443322588cddaf457cf106839a60463 (patch)
tree5471cd70b6275999500103f0a6b49bbc5557c692 /drivers/ide/ide-lib.c
parentide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests (diff)
downloadlinux-7267c3377443322588cddaf457cf106839a60463.tar.xz
linux-7267c3377443322588cddaf457cf106839a60463.zip
ide: remove REQ_TYPE_ATA_CMD
Based on the earlier work by Tejun Heo. All users are gone so we can finally remove it. Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r--drivers/ide/ide-lib.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index a3bd8e8ed6b0..9b44fbdfe41f 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -454,8 +454,7 @@ int ide_set_xfer_rate(ide_drive_t *drive, u8 rate)
static void ide_dump_opcode(ide_drive_t *drive)
{
struct request *rq;
- u8 opcode = 0;
- int found = 0;
+ ide_task_t *task = NULL;
spin_lock(&ide_lock);
rq = NULL;
@@ -464,25 +463,15 @@ static void ide_dump_opcode(ide_drive_t *drive)
spin_unlock(&ide_lock);
if (!rq)
return;
- if (rq->cmd_type == REQ_TYPE_ATA_CMD) {
- char *args = rq->buffer;
- if (args) {
- opcode = args[0];
- found = 1;
- }
- } else if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
- ide_task_t *args = rq->special;
- if (args) {
- opcode = args->tf.command;
- found = 1;
- }
- }
+
+ if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
+ task = rq->special;
printk("ide: failed opcode was: ");
- if (!found)
- printk("unknown\n");
+ if (task == NULL)
+ printk(KERN_CONT "unknown\n");
else
- printk("0x%02x\n", opcode);
+ printk(KERN_CONT "0x%02x\n", task->tf.command);
}
u64 ide_get_lba_addr(struct ide_taskfile *tf, int lba48)