mmc: at91_mci: correct kunmap_atomic()
authorNicolas Ferre <[email protected]>
Fri, 5 Mar 2010 21:43:45 +0000 (13:43 -0800)
committerLinus Torvalds <[email protected]>
Sat, 6 Mar 2010 19:26:43 +0000 (11:26 -0800)
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 <[email protected]>
Cc: Wolfgang Muees <[email protected]>
Cc: Andrew Victor <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/mmc/host/at91_mci.c

index 55507dacb789aaa8901a590e9e0bee7ceab0937c..91dc60cd032b37b676226f508d87329b6af065ae 100644 (file)
@@ -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)