Skip to content

Commit

Permalink
mmc: at91_mci: correct kunmap_atomic()
Browse files Browse the repository at this point in the history
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 <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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Nicolas Ferre authored and Linus Torvalds committed Mar 6, 2010
1 parent 5b27a1a commit 752993e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/host/at91_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 752993e

Please sign in to comment.