From: Evgeniy Polyakov Date: Thu, 5 Jan 2006 10:31:23 +0000 (+0000) Subject: [MMC] mmci: kunmap_atomic() unmaps virtual address, not page X-Git-Tag: firefly_0821_release~39667^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f3e2628bed0d5a88ced8239b35f1534557f9631c;p=firefly-linux-kernel-4.4.55.git [MMC] mmci: kunmap_atomic() unmaps virtual address, not page Signed-off-by: Evgeniy Polyakov Signed-off-by: Andrew Morton Signed-off-by: Russell King --- diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index 6d161c70014a..2b10a2d4ae09 100644 --- a/drivers/mmc/mmci.c +++ b/drivers/mmc/mmci.c @@ -300,7 +300,7 @@ static irqreturn_t mmci_pio_irq(int irq, void *dev_id, struct pt_regs *regs) /* * Unmap the buffer. */ - mmci_kunmap_atomic(host, &flags); + mmci_kunmap_atomic(host, buffer, &flags); host->sg_off += len; host->size -= len; diff --git a/drivers/mmc/mmci.h b/drivers/mmc/mmci.h index 4589bbd68192..6d7eadc9a678 100644 --- a/drivers/mmc/mmci.h +++ b/drivers/mmc/mmci.h @@ -172,8 +172,8 @@ static inline char *mmci_kmap_atomic(struct mmci_host *host, unsigned long *flag return kmap_atomic(sg->page, KM_BIO_SRC_IRQ) + sg->offset; } -static inline void mmci_kunmap_atomic(struct mmci_host *host, unsigned long *flags) +static inline void mmci_kunmap_atomic(struct mmci_host *host, void *buffer, unsigned long *flags) { - kunmap_atomic(host->sg_ptr->page, KM_BIO_SRC_IRQ); + kunmap_atomic(buffer, KM_BIO_SRC_IRQ); local_irq_restore(*flags); }