diff options
| -rw-r--r-- | drivers/ata/libahci.c | 5 |
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, | |||
| 324 | struct ahci_host_priv *hpriv = ap->host->private_data; | 324 | struct ahci_host_priv *hpriv = ap->host->private_data; |
| 325 | void __iomem *mmio = hpriv->mmio; | 325 | void __iomem *mmio = hpriv->mmio; |
| 326 | void __iomem *em_mmio = mmio + hpriv->em_loc; | 326 | void __iomem *em_mmio = mmio + hpriv->em_loc; |
| 327 | const unsigned char *msg_buf = buf; | ||
| 327 | u32 em_ctl, msg; | 328 | u32 em_ctl, msg; |
| 328 | unsigned long flags; | 329 | unsigned long flags; |
| 329 | int i; | 330 | int i; |
| @@ -343,8 +344,8 @@ static ssize_t ahci_store_em_buffer(struct device *dev, | |||
| 343 | } | 344 | } |
| 344 | 345 | ||
| 345 | for (i = 0; i < size; i += 4) { | 346 | for (i = 0; i < size; i += 4) { |
| 346 | msg = buf[i] | buf[i + 1] << 8 | | 347 | msg = msg_buf[i] | msg_buf[i + 1] << 8 | |
| 347 | buf[i + 2] << 16 | buf[i + 3] << 24; | 348 | msg_buf[i + 2] << 16 | msg_buf[i + 3] << 24; |
| 348 | writel(msg, em_mmio + i); | 349 | writel(msg, em_mmio + i); |
| 349 | } | 350 | } |
| 350 | 351 | ||
