summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-06-24 13:30:19 +0200
committerJeff Garzik <jeff@garzik.org>2006-06-27 02:59:27 +0200
commite58eb583969ff662c8c337e9b3b50ab5ef37e27e (patch)
treef29ff3adf6882cfa1065eef15502be0ff86028fd
parent[PATCH] libata: clear EH action on device detach (diff)
downloadlinux-e58eb583969ff662c8c337e9b3b50ab5ef37e27e.tar.xz
linux-e58eb583969ff662c8c337e9b3b50ab5ef37e27e.zip
[PATCH] libata: move ata_do_simple_cmd() below ata_exec_internal()
Move ata_do_simple_cmd() below ata_exec_internal() for consistency. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/scsi/libata-core.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 6c66877be2bf..bbd6665eb212 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1131,6 +1131,29 @@ unsigned ata_exec_internal(struct ata_device *dev,
return err_mask;
}
+/*
+ * Execute a 'simple' command, that only consists of the opcode 'cmd' itself,
+ * without filling any other registers
+ */
+static int ata_do_simple_cmd(struct ata_device *dev, u8 cmd)
+{
+ struct ata_taskfile tf;
+ int err;
+
+ ata_tf_init(dev, &tf);
+
+ tf.command = cmd;
+ tf.flags |= ATA_TFLAG_DEVICE;
+ tf.protocol = ATA_PROT_NODATA;
+
+ err = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
+ if (err)
+ ata_dev_printk(dev, KERN_ERR, "%s: ata command failed: %d\n",
+ __FUNCTION__, err);
+
+ return err;
+}
+
/**
* ata_pio_need_iordy - check if iordy needed
* @adev: ATA device
@@ -4946,29 +4969,6 @@ int ata_port_offline(struct ata_port *ap)
return 0;
}
-/*
- * Execute a 'simple' command, that only consists of the opcode 'cmd' itself,
- * without filling any other registers
- */
-static int ata_do_simple_cmd(struct ata_device *dev, u8 cmd)
-{
- struct ata_taskfile tf;
- int err;
-
- ata_tf_init(dev, &tf);
-
- tf.command = cmd;
- tf.flags |= ATA_TFLAG_DEVICE;
- tf.protocol = ATA_PROT_NODATA;
-
- err = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
- if (err)
- ata_dev_printk(dev, KERN_ERR, "%s: ata command failed: %d\n",
- __FUNCTION__, err);
-
- return err;
-}
-
static int ata_flush_cache(struct ata_device *dev)
{
u8 cmd;