From patchwork Mon Jul 10 14:48:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 9833159 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1E3B460350 for ; Mon, 10 Jul 2017 14:49:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10032284E4 for ; Mon, 10 Jul 2017 14:49:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 043C1284FC; Mon, 10 Jul 2017 14:49:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6713284E4 for ; Mon, 10 Jul 2017 14:49:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753345AbdGJOtM (ORCPT ); Mon, 10 Jul 2017 10:49:12 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:34751 "EHLO mail-wr0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753197AbdGJOtL (ORCPT ); Mon, 10 Jul 2017 10:49:11 -0400 Received: by mail-wr0-f173.google.com with SMTP id 77so141865127wrb.1 for ; Mon, 10 Jul 2017 07:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=HyVluSqHaJCl9iDPE9zGQDTgPrYCoJDSzyuUa65JcMM=; b=ZgXpMF4I46wQwQeEQaTWAqtGECDADrb+RL1FG+A8rG56VADsqLoDKz3npukunTzQGb UVEaWN6m75YhvXAH8gyXl2Hyg9qf3fiD0CDoOhWwFWrT+hEuyy3RQwvobGekvBI+xrya lKSKzJgHK7a0OnovErnJIs21TBL9bupJq+GLQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HyVluSqHaJCl9iDPE9zGQDTgPrYCoJDSzyuUa65JcMM=; b=a940eF8EDtYZvN4mP39gCdx1gug6Q3Ty5H+E/+bKM0cioSk/tZi+6PjmPFhHnblpRW urfWmfFgWLgJDHjGTL4INIz5XD0THlrKzjDhwLYKbLOFzNsniplyFrrPR8wg3M7fZ64p JeFWN+shYUkhjDQvRGnhWCMcB8Kb+VpnCsho23HcesCXxk3EAbrnwSH77nYH+fKhPbP3 ObYoe+AII6IDI23S3hJq24uKrwwxmEOe51LMJJmibUvo9ZMXWGLZf6cV+SlX4O2VH76E 4ik/mYNhcVuX64eAYR3EnJzDuw4c0ujcWhhXymeUwWLtR1zCxV2CAO+ehGAaJhSrjKuJ J2Dw== X-Gm-Message-State: AIVw111SIkFK9SSFXlTF2c1QT9kZvaCAgST6HMwD4YDe/d4kPU8CEUJm WV/wHJBC1XxLp4p6 X-Received: by 10.223.171.146 with SMTP id s18mr8583207wrc.38.1499698149876; Mon, 10 Jul 2017 07:49:09 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.173.155]) by smtp.gmail.com with ESMTPSA id i136sm7924813wmf.33.2017.07.10.07.49.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Jul 2017 07:49:09 -0700 (PDT) From: Benjamin Gaignard 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 Subject: [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU Date: Mon, 10 Jul 2017 16:48:55 +0200 Message-Id: <1499698135-24526-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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