lkml.org 
[lkml]   [2008]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] drm: make drm use create_proc_read_entry() instead

From: Arjan van de Ven <arjan@linux.intel.com>
Subject: [PATCH] drm: make drm use create_proc_read_entry() instead

Al Viro points out that DRM should have used create_proc_read_entry(),
and although that is still racey right now, it at least has a chance
of getting fixed on the api level.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
drivers/char/drm/drm_proc.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/char/drm/drm_proc.c b/drivers/char/drm/drm_proc.c
index 19e61ad..b586378 100644
--- a/drivers/char/drm/drm_proc.c
+++ b/drivers/char/drm/drm_proc.c
@@ -102,8 +102,9 @@ int drm_proc_init(struct drm_minor *minor, int minor_id,
}

for (i = 0; i < DRM_PROC_ENTRIES; i++) {
- ent = create_proc_entry(drm_proc_list[i].name,
- S_IFREG | S_IRUGO, minor->dev_root);
+ ent = create_proc_read_entry(drm_proc_list[i].name,
+ S_IFREG | S_IRUGO, minor->dev_root,
+ drm_proc_list[i].f, minor);
if (!ent) {
DRM_ERROR("Cannot create /proc/dri/%s/%s\n",
name, drm_proc_list[i].name);
@@ -114,8 +115,6 @@ int drm_proc_init(struct drm_minor *minor, int minor_id,
minor->dev_root = NULL;
return -1;
}
- ent->read_proc = drm_proc_list[i].f;
- ent->data = minor;
}

return 0;
--
1.5.5.1


\
 
 \ /
  Last update: 2008-06-01 06:55    [W:2.033 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site