diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2014-08-29 06:12:33 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-09-10 03:40:35 -0400 |
commit | 2791ee85e1e9805d600782e554f706458ec6c84e (patch) | |
tree | a11c15dead03028cc07e591106f2ba8a528a2b94 | |
parent | cc5ea5947a52b98cd9a03d4011a5a12b4e5a99c4 (diff) |
drm: replace weird conditional includes
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 <dh.herrmann@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_vm.c | 1 | ||||
-rw-r--r-- | 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 be25174f10e4..967e570bb0d1 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/efi.h> | 40 | #include <linux/efi.h> |
41 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
42 | #endif | 42 | #endif |
43 | #include <asm/pgtable.h> | ||
43 | #include "drm_legacy.h" | 44 | #include "drm_legacy.h" |
44 | 45 | ||
45 | struct drm_vma_entry { | 46 | struct drm_vma_entry { |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 7a3c73c5375d..31fb30047770 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -36,12 +36,7 @@ | |||
36 | #define _DRM_P_H_ | 36 | #define _DRM_P_H_ |
37 | 37 | ||
38 | #ifdef __KERNEL__ | 38 | #ifdef __KERNEL__ |
39 | #ifdef __alpha__ | 39 | #include <linux/sched.h> |
40 | /* add include of current.h so that "current" is defined | ||
41 | * before static inline funcs in wait.h. Doing this so we | ||
42 | * can build the DRM (part of PI DRI). 4/21/2000 S + B */ | ||
43 | #include <asm/current.h> | ||
44 | #endif /* __alpha__ */ | ||
45 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
46 | #include <linux/kref.h> | 41 | #include <linux/kref.h> |
47 | #include <linux/miscdevice.h> | 42 | #include <linux/miscdevice.h> |
@@ -58,9 +53,6 @@ | |||
58 | #include <linux/io.h> | 53 | #include <linux/io.h> |
59 | #include <linux/slab.h> | 54 | #include <linux/slab.h> |
60 | #include <linux/ratelimit.h> | 55 | #include <linux/ratelimit.h> |
61 | #if defined(__alpha__) || defined(__powerpc__) | ||
62 | #include <asm/pgtable.h> /* For pte_wrprotect */ | ||
63 | #endif | ||
64 | #include <asm/mman.h> | 56 | #include <asm/mman.h> |
65 | #include <asm/uaccess.h> | 57 | #include <asm/uaccess.h> |
66 | #include <linux/types.h> | 58 | #include <linux/types.h> |