From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Herrmann Subject: [PATCH 07/20] drm: replace weird conditional includes Date: Fri, 29 Aug 2014 12:12:33 +0200 Message-ID: <1409307166-12396-8-git-send-email-dh.herrmann@gmail.com> References: <1409307166-12396-1-git-send-email-dh.herrmann@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 09C3B6E2AF for ; Fri, 29 Aug 2014 03:13:30 -0700 (PDT) Received: by mail-wi0-f171.google.com with SMTP id hi2so8798168wib.16 for ; Fri, 29 Aug 2014 03:13:30 -0700 (PDT) In-Reply-To: <1409307166-12396-1-git-send-email-dh.herrmann@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org Cc: Daniel Vetter List-Id: dri-devel@lists.freedesktop.org pte_wrprotect() is only used by drm_vm.c, so move the include there. Also include it unconditionally, all architectures provide this header! Furthermore, replace asm/current.h with sched.h, which includes asm/current.h unconditionally. This way we get the same effect and avoid direct asm/ includes. Furthermore, drop the weird __alpha__ protection. It's safe to include sched.h everywhere (and the wait.h comment doesn't apply, anyway). Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_vm.c | 1 + include/drm/drmP.h | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index be25174..967e570 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -40,6 +40,7 @@ #include #include #endif +#include #include "drm_legacy.h" struct drm_vma_entry { diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 7a3c73c..31fb300 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -36,12 +36,7 @@ #define _DRM_P_H_ #ifdef __KERNEL__ -#ifdef __alpha__ -/* add include of current.h so that "current" is defined - * before static inline funcs in wait.h. Doing this so we - * can build the DRM (part of PI DRI). 4/21/2000 S + B */ -#include -#endif /* __alpha__ */ +#include #include #include #include @@ -58,9 +53,6 @@ #include #include #include -#if defined(__alpha__) || defined(__powerpc__) -#include /* For pte_wrprotect */ -#endif #include #include #include -- 2.1.0