[PATCH 09/15] drm: unexport drm_global_mutex

Daniel Vetter daniel.vetter at ffwll.ch
Wed Sep 10 03:43:54 PDT 2014


Drivers really, really have no business even looking at this lock. And
thankfully they don't.

So unexport it and move the declaration to drm_internal.h.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/drm_fops.c     | 1 -
 drivers/gpu/drm/drm_internal.h | 1 +
 drivers/gpu/drm/drm_lock.c     | 1 +
 include/drm/drmP.h             | 1 -
 4 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index d6b7fc559df7..c99414ebc998 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -43,7 +43,6 @@
 
 /* from BKL pushdown */
 DEFINE_MUTEX(drm_global_mutex);
-EXPORT_SYMBOL(drm_global_mutex);
 
 static int drm_open_helper(struct file *filp, struct drm_minor *minor);
 
diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
index a71cf4b839f2..d6dc75534304 100644
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@ -25,6 +25,7 @@
 extern unsigned int drm_timestamp_monotonic;
 
 /* drm_fops.c */
+extern struct mutex drm_global_mutex;
 int drm_lastclose(struct drm_device *dev);
 
 /* drm_pci.c */
diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c
index 727b032292b4..f861361a635e 100644
--- a/drivers/gpu/drm/drm_lock.c
+++ b/drivers/gpu/drm/drm_lock.c
@@ -36,6 +36,7 @@
 #include <linux/export.h>
 #include <drm/drmP.h>
 #include "drm_legacy.h"
+#include "drm_internal.h"
 
 static int drm_notifier(void *priv);
 
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index ce2f9d0175f8..197133a5139b 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1086,7 +1086,6 @@ extern long drm_compat_ioctl(struct file *filp,
 extern bool drm_ioctl_flags(unsigned int nr, unsigned int *flags);
 
 				/* Device support (drm_fops.h) */
-extern struct mutex drm_global_mutex;
 extern int drm_open(struct inode *inode, struct file *filp);
 extern ssize_t drm_read(struct file *filp, char __user *buffer,
 			size_t count, loff_t *offset);
-- 
1.9.3



More information about the dri-devel mailing list