From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: b.zolnierkie@samsung.com, daniel.vetter@ffwll.ch,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
noralf@tronnes.org, dri-devel@lists.freedesktop.org,
emil.l.velikov@gmail.com, yannick.fertre@st.com
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Subject: [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU
Date: Mon, 10 Jul 2017 14:48:55 +0000 [thread overview]
Message-ID: <1499698135-24526-1-git-send-email-benjamin.gaignard@linaro.org> (raw)
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@linaro.org>
---
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..16b5aef 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
next reply other threads:[~2017-07-10 14:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-10 14:48 Benjamin Gaignard [this message]
2017-07-10 16:31 ` [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU Eric Engestrom
2017-07-12 0:10 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1499698135-24526-1-git-send-email-benjamin.gaignard@linaro.org \
--to=benjamin.gaignard@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noralf@tronnes.org \
--cc=yannick.fertre@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).