Commit 752993ef authored by Nicolas Ferre's avatar Nicolas Ferre Committed by Linus Torvalds

mmc: at91_mci: correct kunmap_atomic()

kunmap_atomic() accepts a pointer to any location in the page so we do not
need the subtraction and cast.
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Cc: Wolfgang Muees <wolfgang.mues@auerswald.de>
Cc: Andrew Victor <avictor.za@gmail.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5b27a1a5
...@@ -248,7 +248,7 @@ static inline void at91_mci_sg_to_dma(struct at91mci_host *host, struct mmc_data ...@@ -248,7 +248,7 @@ static inline void at91_mci_sg_to_dma(struct at91mci_host *host, struct mmc_data
dmabuf = (unsigned *)tmpv; dmabuf = (unsigned *)tmpv;
} }
kunmap_atomic(((void *)sgbuffer) - sg->offset, KM_BIO_SRC_IRQ); kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ);
if (size == 0) if (size == 0)
break; break;
...@@ -313,7 +313,7 @@ static void at91_mci_post_dma_read(struct at91mci_host *host) ...@@ -313,7 +313,7 @@ static void at91_mci_post_dma_read(struct at91mci_host *host)
dmabuf = (unsigned *)tmpv; dmabuf = (unsigned *)tmpv;
} }
kunmap_atomic(((void *)sgbuffer)-sg->offset, KM_BIO_SRC_IRQ); kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ);
dmac_flush_range((void *)sgbuffer, ((void *)sgbuffer) + amount); dmac_flush_range((void *)sgbuffer, ((void *)sgbuffer) + amount);
data->bytes_xfered += amount; data->bytes_xfered += amount;
if (size == 0) if (size == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment