aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@suse.com>2016-01-22 21:34:22 -0500
committerIngo Molnar <mingo@kernel.org>2016-03-09 08:57:51 -0500
commitf6e45661f9be546811b62b2b01f32f4bf0c436c0 (patch)
tree6f23a99fb34604c43a04e9f943553e16100bc516 /drivers/video/fbdev/omap
parente2857b8f11a289ed2b61d18d0665e05c1053c446 (diff)
dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc()
Rename dma_*_writecombine() to dma_*_wc(), so that the naming is coherent across the various write-combining APIs. Keep the old names for compatibility for a while, these can be removed at a later time. A guard is left to enable backporting of the rename, and later remove of the old mapping defines seemlessly. Build tested successfully with allmodconfig. The following Coccinelle SmPL patch was used for this simple transformation: @ rename_dma_alloc_writecombine @ expression dev, size, dma_addr, gfp; @@ -dma_alloc_writecombine(dev, size, dma_addr, gfp) +dma_alloc_wc(dev, size, dma_addr, gfp) @ rename_dma_free_writecombine @ expression dev, size, cpu_addr, dma_addr; @@ -dma_free_writecombine(dev, size, cpu_addr, dma_addr) +dma_free_wc(dev, size, cpu_addr, dma_addr) @ rename_dma_mmap_writecombine @ expression dev, vma, cpu_addr, dma_addr, size; @@ -dma_mmap_writecombine(dev, vma, cpu_addr, dma_addr, size) +dma_mmap_wc(dev, vma, cpu_addr, dma_addr, size) We also keep the old names as compatibility helpers, and guard against their definition to make backporting easier. Generated-by: Coccinelle SmPL Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: airlied@linux.ie Cc: akpm@linux-foundation.org Cc: benh@kernel.crashing.org Cc: bhelgaas@google.com Cc: bp@suse.de Cc: dan.j.williams@intel.com Cc: daniel.vetter@ffwll.ch Cc: dhowells@redhat.com Cc: julia.lawall@lip6.fr Cc: konrad.wilk@oracle.com Cc: linux-fbdev@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: luto@amacapital.net Cc: mst@redhat.com Cc: tomi.valkeinen@ti.com Cc: toshi.kani@hp.com Cc: vinod.koul@intel.com Cc: xen-devel@lists.xensource.com Link: http://lkml.kernel.org/r/1453516462-4844-1-git-send-email-mcgrof@do-not-panic.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/video/fbdev/omap')
-rw-r--r--drivers/video/fbdev/omap/lcdc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/video/fbdev/omap/lcdc.c b/drivers/video/fbdev/omap/lcdc.c
index 6efa2591eaa8..e3d9b9ea5498 100644
--- a/drivers/video/fbdev/omap/lcdc.c
+++ b/drivers/video/fbdev/omap/lcdc.c
@@ -612,8 +612,8 @@ static void lcdc_dma_handler(u16 status, void *data)
612 612
613static int alloc_palette_ram(void) 613static int alloc_palette_ram(void)
614{ 614{
615 lcdc.palette_virt = dma_alloc_writecombine(lcdc.fbdev->dev, 615 lcdc.palette_virt = dma_alloc_wc(lcdc.fbdev->dev, MAX_PALETTE_SIZE,
616 MAX_PALETTE_SIZE, &lcdc.palette_phys, GFP_KERNEL); 616 &lcdc.palette_phys, GFP_KERNEL);
617 if (lcdc.palette_virt == NULL) { 617 if (lcdc.palette_virt == NULL) {
618 dev_err(lcdc.fbdev->dev, "failed to alloc palette memory\n"); 618 dev_err(lcdc.fbdev->dev, "failed to alloc palette memory\n");
619 return -ENOMEM; 619 return -ENOMEM;
@@ -625,8 +625,8 @@ static int alloc_palette_ram(void)
625 625
626static void free_palette_ram(void) 626static void free_palette_ram(void)
627{ 627{
628 dma_free_writecombine(lcdc.fbdev->dev, MAX_PALETTE_SIZE, 628 dma_free_wc(lcdc.fbdev->dev, MAX_PALETTE_SIZE, lcdc.palette_virt,
629 lcdc.palette_virt, lcdc.palette_phys); 629 lcdc.palette_phys);
630} 630}
631 631
632static int alloc_fbmem(struct omapfb_mem_region *region) 632static int alloc_fbmem(struct omapfb_mem_region *region)
@@ -642,8 +642,8 @@ static int alloc_fbmem(struct omapfb_mem_region *region)
642 if (region->size > frame_size) 642 if (region->size > frame_size)
643 frame_size = region->size; 643 frame_size = region->size;
644 lcdc.vram_size = frame_size; 644 lcdc.vram_size = frame_size;
645 lcdc.vram_virt = dma_alloc_writecombine(lcdc.fbdev->dev, 645 lcdc.vram_virt = dma_alloc_wc(lcdc.fbdev->dev, lcdc.vram_size,
646 lcdc.vram_size, &lcdc.vram_phys, GFP_KERNEL); 646 &lcdc.vram_phys, GFP_KERNEL);
647 if (lcdc.vram_virt == NULL) { 647 if (lcdc.vram_virt == NULL) {
648 dev_err(lcdc.fbdev->dev, "unable to allocate FB DMA memory\n"); 648 dev_err(lcdc.fbdev->dev, "unable to allocate FB DMA memory\n");
649 return -ENOMEM; 649 return -ENOMEM;
@@ -660,8 +660,8 @@ static int alloc_fbmem(struct omapfb_mem_region *region)
660 660
661static void free_fbmem(void) 661static void free_fbmem(void)
662{ 662{
663 dma_free_writecombine(lcdc.fbdev->dev, lcdc.vram_size, 663 dma_free_wc(lcdc.fbdev->dev, lcdc.vram_size, lcdc.vram_virt,
664 lcdc.vram_virt, lcdc.vram_phys); 664 lcdc.vram_phys);
665} 665}
666 666
667static int setup_fbmem(struct omapfb_mem_desc *req_md) 667static int setup_fbmem(struct omapfb_mem_desc *req_md)