drm/i915: forcewake debugfs fix
authorBen Widawsky <ben@bwidawsk.net>
Wed, 11 May 2011 22:10:58 +0000 (15:10 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 13 May 2011 20:38:35 +0000 (13:38 -0700)
Forcewake needs to register itself with drm to use the remove function.

The file also should be read only.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/i915_debugfs.c

index c0ce5e44ac3a321ddd5eabe1dc91649559ad983e..183eaac8980a3f6a31bb4c9027695eed2a59caa6 100644 (file)
@@ -1383,13 +1383,13 @@ static int i915_forcewake_create(struct dentry *root, struct drm_minor *minor)
        struct dentry *ent;
 
        ent = debugfs_create_file("i915_forcewake_user",
-                                 S_IRWXU,
+                                 S_IRUSR,
                                  root, dev,
                                  &i915_forcewake_fops);
        if (IS_ERR(ent))
                return PTR_ERR(ent);
 
-       return 0;
+       return drm_add_fake_info_node(minor, ent, &i915_forcewake_fops);
 }
 
 static struct drm_info_list i915_debugfs_list[] = {