diff mbox

drm/i915: Make uapi/i915_drm.h standalone

Message ID 20170127104919.21306-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Jan. 27, 2017, 10:49 a.m. UTC
In order for us to be able to simply copy our uapi/i915_drm.h into
userspace it must be compilable as-is by userspace. For which we need
to hide the sparse markup for __user. This does impose the limitation
that we include our uapi/i915_drm.h last so that the attribute is
properly defined inside the kernel.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 include/uapi/drm/i915_drm.h | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 202790a3e8e2..5b12506683f1 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -29,6 +29,11 @@ 
 
 #include "drm.h"
 
+/* Disable unused sparse attributes from userspace */
+#ifndef __user
+#define __user
+#endif
+
 #if defined(__cplusplus)
 extern "C" {
 #endif