summaryrefslogtreecommitdiff
path: root/bsd-core/drm_vm.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-10-22 22:08:53 +0000
committerEric Anholt <anholt@freebsd.org>2003-10-22 22:08:53 +0000
commit86e6325e5ab848c15c422f20133445fe6c1caa09 (patch)
tree8c4699b4ddac738ed005d5f4aedd9dae4c628bed /bsd-core/drm_vm.c
parent4e6ddcbb698c029b407d5dc43348c6e422a36705 (diff)
- Add DRM_GET_PRIV_WITH_RETURN macro. This can be used in shared code to
get the drm_file_t * based on the filp passed in ioctl handlers. - Use this macro on BSD for simplification and improve its error reporting. Make failure to find the drm_file_t * print as an error, not debug. This failure may be part of the problem with KDE. - Make debug and error print macros include the pid on BSD.
Diffstat (limited to 'bsd-core/drm_vm.c')
-rw-r--r--bsd-core/drm_vm.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/bsd-core/drm_vm.c b/bsd-core/drm_vm.c
index 9e9f1e14..e4ae8c7e 100644
--- a/bsd-core/drm_vm.c
+++ b/bsd-core/drm_vm.c
@@ -65,13 +65,7 @@ paddr_t DRM(mmap)(dev_t kdev, off_t offset, int prot)
drm_map_list_entry_t *listentry = NULL;
drm_file_t *priv;
- DRM_LOCK();
- priv = DRM(find_file_by_proc)(dev, DRM_CURPROC);
- DRM_UNLOCK();
- if (!priv) {
- DRM_DEBUG("can't find authenticator\n");
- return EINVAL;
- }
+ DRM_GET_PRIV_WITH_RETURN(priv, (DRMFILE)DRM_CURRENTPID);
if (!priv->authenticated)
return DRM_ERR(EACCES);