summaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-11-01 16:40:44 +0100
committerSean Paul <seanpaul@chromium.org>2016-11-02 16:33:47 +0100
commit55edf41b699bcb31dcf45082d99e91b7e217206e (patch)
treeffebf8ce162670b22e2befa0a438cb0b740f385d /include/drm/drmP.h
parentdrm/gma500: Add compat ioctl (diff)
downloadlinux-55edf41b699bcb31dcf45082d99e91b7e217206e.tar.xz
linux-55edf41b699bcb31dcf45082d99e91b7e217206e.zip
drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs
If we define drm_compat_ioctl NULL on CONFIG_COMPAT=n, we don't have to check for the config everywhere. Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1478014844-27454-1-git-send-email-jani.nikula@intel.com
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index e336e3901876..a3effab98407 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -941,8 +941,13 @@ static inline bool drm_is_primary_client(const struct drm_file *file_priv)
extern int drm_ioctl_permit(u32 flags, struct drm_file *file_priv);
extern long drm_ioctl(struct file *filp,
unsigned int cmd, unsigned long arg);
+#ifdef CONFIG_COMPAT
extern long drm_compat_ioctl(struct file *filp,
unsigned int cmd, unsigned long arg);
+#else
+/* Let drm_compat_ioctl be assigned to .compat_ioctl unconditionally */
+#define drm_compat_ioctl NULL
+#endif
extern bool drm_ioctl_flags(unsigned int nr, unsigned int *flags);
/* File Operations (drm_fops.c) */