summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/renesas_sdhi_sys_dmac.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2022-11-02 15:54:29 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2022-12-07 15:22:36 +0300
commit8840e1c13cb40d2a207f875f3c730f399a21d4d4 (patch)
treeb64e3f8f6f23c1944a52cdec3425b5514b0561b9 /drivers/mmc/host/renesas_sdhi_sys_dmac.c
parentc330601c9c93392000c077d973b182cc0164b9ac (diff)
downloadlinux-8840e1c13cb40d2a207f875f3c730f399a21d4d4.tar.xz
mmc: tmio: remove tmio_mmc_k(un)map_atomic helpers
After a8402aed8ca5 ("mmc: tmio_mmc_core: Remove local_irq_{save,restore}() around k[un]map_atomic()") and ac91578a6812 ("mmc: tmio_mmc_core: Replace kmap_atomic() with kmap_local_page()"), the helpers contain just a single call. Putting it directly in the code makes it actually more readable. More so, because we now avoid the 'offset' calculation when mapping/unmapping and just use it when we need it in the copy routines. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20221102125430.28466-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/renesas_sdhi_sys_dmac.c')
-rw-r--r--drivers/mmc/host/renesas_sdhi_sys_dmac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
index e9cc6c15d229..c4545cb143dd 100644
--- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
@@ -254,11 +254,11 @@ static void renesas_sdhi_sys_dmac_start_dma_tx(struct tmio_mmc_host *host)
/* The only sg element can be unaligned, use our bounce buffer then */
if (!aligned) {
- void *sg_vaddr = tmio_mmc_kmap_atomic(sg);
+ void *sg_vaddr = kmap_local_page(sg_page(sg));
sg_init_one(&host->bounce_sg, host->bounce_buf, sg->length);
- memcpy(host->bounce_buf, sg_vaddr, host->bounce_sg.length);
- tmio_mmc_kunmap_atomic(sg, sg_vaddr);
+ memcpy(host->bounce_buf, sg_vaddr + sg->offset, host->bounce_sg.length);
+ kunmap_local(sg_vaddr);
host->sg_ptr = &host->bounce_sg;
sg = host->sg_ptr;
}