From: Nicolas Ferre Date: Fri, 5 Mar 2010 21:43:45 +0000 (-0800) Subject: mmc: at91_mci: correct kunmap_atomic() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=752993ef8e40d1863b26c7dc51e12223588d0fe0;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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: Nicolas Ferre Cc: Wolfgang Muees Cc: Andrew Victor Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 55507dacb789..91dc60cd032b 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c @@ -248,7 +248,7 @@ static inline void at91_mci_sg_to_dma(struct at91mci_host *host, struct mmc_data dmabuf = (unsigned *)tmpv; } - kunmap_atomic(((void *)sgbuffer) - sg->offset, KM_BIO_SRC_IRQ); + kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ); if (size == 0) break; @@ -313,7 +313,7 @@ static void at91_mci_post_dma_read(struct at91mci_host *host) 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); data->bytes_xfered += amount; if (size == 0)