diff --git a/sys/external/bsd/drm/dist/bsd-core/drmP.h b/sys/external/bsd/drm/dist/bsd-core/drmP.h index 5c350ca91bf6..2a9da72dd2a8 100644 --- a/sys/external/bsd/drm/dist/bsd-core/drmP.h +++ b/sys/external/bsd/drm/dist/bsd-core/drmP.h @@ -582,9 +582,6 @@ struct drm_file { int minor; pid_t pid; uid_t uid; -#if defined(__NetBSD__) - int refs; -#endif drm_magic_t magic; unsigned long ioctl_count; void *driver_priv; diff --git a/sys/external/bsd/drm/dist/bsd-core/drm_fops.c b/sys/external/bsd/drm/dist/bsd-core/drm_fops.c index a53f79a8d55d..2ea45902812c 100644 --- a/sys/external/bsd/drm/dist/bsd-core/drm_fops.c +++ b/sys/external/bsd/drm/dist/bsd-core/drm_fops.c @@ -70,9 +70,7 @@ int drm_open_helper(dev_t kdev, int flags, int fmt, struct proc *p, DRM_LOCK(); priv = drm_find_file_by_proc(dev, p); - if (priv) { - priv->refs++; - } else { + if (!priv) { priv = malloc(sizeof(*priv), DRM_MEM_FILES, M_NOWAIT | M_ZERO); if (priv == NULL) { DRM_UNLOCK(); @@ -81,7 +79,6 @@ int drm_open_helper(dev_t kdev, int flags, int fmt, struct proc *p, priv->uid = kauth_cred_getsvuid(p->p_cred); priv->pid = p->p_pid; - priv->refs = 1; priv->minor = m; priv->ioctl_count = 0;