]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/mmc/host/tmio_mmc.h
mmc: fix the use of kunmap_atomic() in tmio_mmc.h
[net-next-2.6.git] / drivers / mmc / host / tmio_mmc.h
index 79446047ee78384db39b35a3d32ae286f6547a61..0fedc78e3ea5c4613767d7d31e534143b4bf1780 100644 (file)
@@ -174,19 +174,17 @@ static inline int tmio_mmc_next_sg(struct tmio_mmc_host *host)
        return --host->sg_len;
 }
 
-static inline char *tmio_mmc_kmap_atomic(struct tmio_mmc_host *host,
+static inline char *tmio_mmc_kmap_atomic(struct scatterlist *sg,
        unsigned long *flags)
 {
-       struct scatterlist *sg = host->sg_ptr;
-
        local_irq_save(*flags);
        return kmap_atomic(sg_page(sg), KM_BIO_SRC_IRQ) + sg->offset;
 }
 
-static inline void tmio_mmc_kunmap_atomic(struct tmio_mmc_host *host,
+static inline void tmio_mmc_kunmap_atomic(void *virt,
        unsigned long *flags)
 {
-       kunmap_atomic(sg_page(host->sg_ptr), KM_BIO_SRC_IRQ);
+       kunmap_atomic(virt, KM_BIO_SRC_IRQ);
        local_irq_restore(*flags);
 }