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 <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Cc: Noralf Trønnes <[email protected]>
Cc: Emil Velikov <[email protected]>
Cc: Yannick Fertre <[email protected]>
Cc: Eric Engestrom <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
Benjamin Gaignard 2017-07-12 18:28:11 +02:00 • committed by Bartlomiej Zolnierkiewicz
commit 4c99ceda0d

View file

@ -1492,7 +1492,7 @@ __releases(&info->lock)
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 @@ static const struct file_operations fb_fops = {
.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