diff options
Diffstat (limited to 'sys/dev/pci/drm/drm_fops.c')
-rw-r--r-- | sys/dev/pci/drm/drm_fops.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/sys/dev/pci/drm/drm_fops.c b/sys/dev/pci/drm/drm_fops.c index 6c7334eb727..3dcff9d8700 100644 --- a/sys/dev/pci/drm/drm_fops.c +++ b/sys/dev/pci/drm/drm_fops.c @@ -36,8 +36,6 @@ #include "drmP.h" -#ifdef __OpenBSD__ - drm_file_t * drm_find_file_by_minor(struct drm_device *dev, int minor) { @@ -51,25 +49,6 @@ drm_find_file_by_minor(struct drm_device *dev, int minor) return (NULL); } -#else - -drm_file_t * -drm_find_file_by_proc(drm_device_t *dev, DRM_STRUCTPROC *p) -{ - uid_t uid = DRM_UID(p); - pid_t pid = DRM_PID(p); - - drm_file_t *priv; - - DRM_SPINLOCK_ASSERT(&dev->dev_lock); - - TAILQ_FOREACH(priv, &dev->files, link) - if (priv->pid == pid && priv->uid == uid) - return priv; - return NULL; -} -#endif - /* drm_open_helper is called whenever a process opens /dev/drm. */ int drm_open_helper(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p, @@ -86,11 +65,7 @@ drm_open_helper(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p, DRM_DEBUG("pid = %d, minor = %d\n", DRM_CURRENTPID, m); DRM_LOCK(); -#ifdef __OpenBSD__ priv = drm_find_file_by_minor(dev, m); -#else - priv = drm_find_file_by_proc(dev, p); -#endif if (priv) { priv->refs++; } else { @@ -120,22 +95,17 @@ drm_open_helper(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p, } /* first opener automatically becomes master if root */ -#ifdef __OpenBSD__ if (TAILQ_EMPTY(&dev->files) && !DRM_SUSER(p)) { free(priv, M_DRM); DRM_UNLOCK(); return (EPERM); } -#endif priv->master = TAILQ_EMPTY(&dev->files); TAILQ_INSERT_TAIL(&dev->files, priv, link); } DRM_UNLOCK(); -#ifdef __FreeBSD__ - kdev->si_drv1 = dev; -#endif return 0; } |