aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/pata_qdi.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-15 13:49:09 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-15 13:49:09 -0800
commit0938e7586440ac97cedc0f5528a8684ebfa4ce43 (patch)
tree3bdb55cb86b1ffb0bd136713eec975efae4cc651 /drivers/ata/pata_qdi.c
parent7d2284b09fd967b5cad6f03c6d4a5c064f37b855 (diff)
parent121a09e590d54be840289c6feac840453aa999d9 (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: correct handling of TSS DVD [libata] core checkpatch fix [libata] pata_bf54x: checkpatch fixes libata fixes for sparse-found problems
Diffstat (limited to 'drivers/ata/pata_qdi.c')
-rw-r--r--drivers/ata/pata_qdi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c
index 7d4c696c4cb..a4c0e502cb4 100644
--- a/drivers/ata/pata_qdi.c
+++ b/drivers/ata/pata_qdi.c
@@ -136,14 +136,12 @@ static void qdi_data_xfer(struct ata_device *adev, unsigned char *buf, unsigned
ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
if (unlikely(slop)) {
- u32 pad;
+ __le32 pad = 0;
if (write_data) {
memcpy(&pad, buf + buflen - slop, slop);
- pad = le32_to_cpu(pad);
- iowrite32(pad, ap->ioaddr.data_addr);
+ iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr);
} else {
- pad = ioread32(ap->ioaddr.data_addr);
- pad = cpu_to_le32(pad);
+ pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr));
memcpy(buf + buflen - slop, &pad, slop);
}
}