From 3698988b7d3542ae549ef3ab93173840d9137f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Espen=20Fjellv=C3=A6r=20Olsen?= Date: Tue, 8 Jan 2013 20:53:54 +0100 Subject: Revert "exynos-mem: Add fimc1 to mmap whitelist check" This reverts commit eaa468eae8c9d87e4c83b30d977e744b3e373613. --- drivers/char/exynos_mem.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'drivers/char') diff --git a/drivers/char/exynos_mem.c b/drivers/char/exynos_mem.c index 658af9a..fdbaf4d 100644 --- a/drivers/char/exynos_mem.c +++ b/drivers/char/exynos_mem.c @@ -266,6 +266,12 @@ void cma_region_descriptor_add(const char *name, int start, int size) int exynos_mem_mmap(struct file *filp, struct vm_area_struct *vma) { + +/* Devices not having DMA CMA acess shouldn't be using this in any case at all */ +#ifndef CONFIG_DMA_CMA + return -EINVAL; +#endif + struct exynos_mem *mem = (struct exynos_mem *)filp->private_data; bool cacheable = mem->cacheable; dma_addr_t start = 0; @@ -303,9 +309,8 @@ int exynos_mem_mmap(struct file *filp, struct vm_area_struct *vma) * * Add exceptions as we go. */ - if(strcmp(b->name, "s3c-fimc") == 0 || - strcmp(b->name, "ion") == 0 || - strcmp(b->name, "fimc1") == 0) { + + if(strcmp(b->name, "s3c-fimc") == 0) { allowed = true; pr_info("[%s] Accessing space 0x%08x/0x%08x for '%s'\n", __func__, b->start, b->size, b->name); -- cgit v1.1