[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1499845387-10394-1-git-send-email-benjamin.gaignard@linaro.org>
Date: Wed, 12 Jul 2017 09:43:07 +0200
From: Benjamin Gaignard <benjamin.gaignard@...aro.org>
To: b.zolnierkie@...sung.com, daniel.vetter@...ll.ch,
linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org,
noralf@...nnes.org, dri-devel@...ts.freedesktop.org,
emil.l.velikov@...il.com, yannick.fertre@...com,
eric.engestrom@...tec.com
Cc: Benjamin Gaignard <benjamin.gaignard@...aro.org>
Subject: [PATCH v2] fbdev: make get_fb_unmapped_area depends of !MMU
Even if CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA flag is selected
do not compile and use get_fb_unmapped_area() if CONFIG_MMU is
also set. This will avoid mmap errors when compiling multi
architectures at same time.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...aro.org>
---
version 2:
- remove duplicated "\"
drivers/video/fbdev/core/fbmem.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 069fe79..f20c5d2 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1492,7 +1492,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd,
return 0;
}
-#ifdef CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA
+#if defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && !defined(CONFIG_MMU)
unsigned long get_fb_unmapped_area(struct file *filp,
unsigned long addr, unsigned long len,
unsigned long pgoff, unsigned long flags)
@@ -1519,7 +1519,8 @@ unsigned long get_fb_unmapped_area(struct file *filp,
.open = fb_open,
.release = fb_release,
#if defined(HAVE_ARCH_FB_UNMAPPED_AREA) || \
- defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA)
+ (defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && \
+ !defined(CONFIG_MMU))
.get_unmapped_area = get_fb_unmapped_area,
#endif
#ifdef CONFIG_FB_DEFERRED_IO
--
1.9.1
Powered by blists - more mailing lists