diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2012-11-01 11:28:36 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-11-28 12:40:07 -0500 |
commit | 52bd4978c61bc23e619a4287a3d30814c97b5d4e (patch) | |
tree | d4dc9b4c9c3b41186f608508d05ff8f56edab84b /drivers/ata/pata_arasan_cf.c | |
parent | 121650a55535e4a3f152a30ee42f26e815eff714 (diff) |
pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start()
'acdev->qc', 'acdev->qc->ap', and 'acdev->qc->tf' expressions are used multiple
times in this function, so it makes sense to use the local variables for them.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_arasan_cf.c')
-rw-r--r-- | drivers/ata/pata_arasan_cf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index 371fd2c698b7..9764e80f9320 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c | |||
@@ -674,13 +674,16 @@ void arasan_cf_error_handler(struct ata_port *ap) | |||
674 | 674 | ||
675 | static void arasan_cf_dma_start(struct arasan_cf_dev *acdev) | 675 | static void arasan_cf_dma_start(struct arasan_cf_dev *acdev) |
676 | { | 676 | { |
677 | struct ata_queued_cmd *qc = acdev->qc; | ||
678 | struct ata_port *ap = qc->ap; | ||
679 | struct ata_taskfile *tf = &qc->tf; | ||
677 | u32 xfer_ctr = readl(acdev->vbase + XFER_CTR) & ~XFER_DIR_MASK; | 680 | u32 xfer_ctr = readl(acdev->vbase + XFER_CTR) & ~XFER_DIR_MASK; |
678 | u32 write = acdev->qc->tf.flags & ATA_TFLAG_WRITE; | 681 | u32 write = tf->flags & ATA_TFLAG_WRITE; |
679 | 682 | ||
680 | xfer_ctr |= write ? XFER_WRITE : XFER_READ; | 683 | xfer_ctr |= write ? XFER_WRITE : XFER_READ; |
681 | writel(xfer_ctr, acdev->vbase + XFER_CTR); | 684 | writel(xfer_ctr, acdev->vbase + XFER_CTR); |
682 | 685 | ||
683 | acdev->qc->ap->ops->sff_exec_command(acdev->qc->ap, &acdev->qc->tf); | 686 | ap->ops->sff_exec_command(ap, tf); |
684 | ata_sff_queue_work(&acdev->work); | 687 | ata_sff_queue_work(&acdev->work); |
685 | } | 688 | } |
686 | 689 | ||