aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libahci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-07-01 18:40:54 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-07-01 18:40:54 -0700
commit826456989f1e9fe15daf2183c630ea9c7ab7c46d (patch)
treefa5dec62b73dfad09ad49f1e2797a0e303bd194b /drivers/ata/libahci.c
parentcorrect console log level when ERST ACPI table is not found (diff)
parentata_generic: implement ATA_GEN_* flags and force enable DMA on MBP 7,1 (diff)
downloadlinux-dev-826456989f1e9fe15daf2183c630ea9c7ab7c46d.tar.xz
linux-dev-826456989f1e9fe15daf2183c630ea9c7ab7c46d.zip
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: ata_generic: implement ATA_GEN_* flags and force enable DMA on MBP 7,1 ahci,ata_generic: let ata_generic handle new MBP w/ MCP89 libahci: Fix bug in storing EM messages
Diffstat (limited to 'drivers/ata/libahci.c')
-rw-r--r--drivers/ata/libahci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 261f86d102e8..81e772a94d59 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -324,6 +324,7 @@ static ssize_t ahci_store_em_buffer(struct device *dev,
struct ahci_host_priv *hpriv = ap->host->private_data;
void __iomem *mmio = hpriv->mmio;
void __iomem *em_mmio = mmio + hpriv->em_loc;
+ const unsigned char *msg_buf = buf;
u32 em_ctl, msg;
unsigned long flags;
int i;
@@ -343,8 +344,8 @@ static ssize_t ahci_store_em_buffer(struct device *dev,
}
for (i = 0; i < size; i += 4) {
- msg = buf[i] | buf[i + 1] << 8 |
- buf[i + 2] << 16 | buf[i + 3] << 24;
+ msg = msg_buf[i] | msg_buf[i + 1] << 8 |
+ msg_buf[i + 2] << 16 | msg_buf[i + 3] << 24;
writel(msg, em_mmio + i);
}