From 86e6325e5ab848c15c422f20133445fe6c1caa09 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 22 Oct 2003 22:08:53 +0000 Subject: - 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. --- bsd-core/drm_auth.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'bsd-core/drm_auth.c') diff --git a/bsd-core/drm_auth.c b/bsd-core/drm_auth.c index 9e34b35c..537718c1 100644 --- a/bsd-core/drm_auth.c +++ b/bsd-core/drm_auth.c @@ -120,13 +120,7 @@ int DRM(getmagic)(DRM_IOCTL_ARGS) drm_file_t *priv; DRM_DEVICE; - DRM_LOCK(); - priv = (drm_file_t *) DRM(find_file_by_proc)(dev, p); - DRM_UNLOCK(); - if (priv == NULL) { - DRM_DEBUG("can't find authenticator\n"); - return EINVAL; - } + DRM_GET_PRIV_WITH_RETURN(priv, filp); /* Find unique magic */ if (priv->magic) { -- cgit v1.2.3