diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2017-01-26 23:56:11 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-03-01 16:09:52 +0100 |
commit | 81895b54093af47549d572608677c624972055da (patch) | |
tree | ab4f348790e0394121aaa49b37fc0a29ef71f9eb /drivers/gpu/drm/msm/msm_rd.c | |
parent | b05eeb0f47a3f9f2530f1c46b11dacfa0ca71876 (diff) | |
download | blackbird-obmc-linux-81895b54093af47549d572608677c624972055da.tar.gz blackbird-obmc-linux-81895b54093af47549d572608677c624972055da.zip |
drm/msm: Remove drm_debugfs_remove_files() calls
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so it's not necessary to call
drm_debugfs_remove_files(). Additionally it uses
debugfs_remove_recursive() to clean up the debugfs files, so no need
to do that.
Cc: robdclark@gmail.com
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-10-noralf@tronnes.org
Diffstat (limited to 'drivers/gpu/drm/msm/msm_rd.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_rd.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c index 6607456dc626..ab0b39f56780 100644 --- a/drivers/gpu/drm/msm/msm_rd.c +++ b/drivers/gpu/drm/msm/msm_rd.c @@ -84,9 +84,6 @@ struct msm_rd_state { bool open; - struct dentry *ent; - struct drm_info_node *node; - /* current submit to read out: */ struct msm_gem_submit *submit; @@ -219,6 +216,7 @@ int msm_rd_debugfs_init(struct drm_minor *minor) { struct msm_drm_private *priv = minor->dev->dev_private; struct msm_rd_state *rd; + struct dentry *ent; /* only create on first minor: */ if (priv->rd) @@ -236,26 +234,14 @@ int msm_rd_debugfs_init(struct drm_minor *minor) init_waitqueue_head(&rd->fifo_event); - rd->node = kzalloc(sizeof(*rd->node), GFP_KERNEL); - if (!rd->node) - goto fail; - - rd->ent = debugfs_create_file("rd", S_IFREG | S_IRUGO, + ent = debugfs_create_file("rd", S_IFREG | S_IRUGO, minor->debugfs_root, rd, &rd_debugfs_fops); - if (!rd->ent) { + if (!ent) { DRM_ERROR("Cannot create /sys/kernel/debug/dri/%pd/rd\n", minor->debugfs_root); goto fail; } - rd->node->minor = minor; - rd->node->dent = rd->ent; - rd->node->info_ent = NULL; - - mutex_lock(&minor->debugfs_lock); - list_add(&rd->node->list, &minor->debugfs_list); - mutex_unlock(&minor->debugfs_lock); - return 0; fail: @@ -272,18 +258,7 @@ void msm_rd_debugfs_cleanup(struct drm_minor *minor) return; priv->rd = NULL; - - debugfs_remove(rd->ent); - - if (rd->node) { - mutex_lock(&minor->debugfs_lock); - list_del(&rd->node->list); - mutex_unlock(&minor->debugfs_lock); - kfree(rd->node); - } - mutex_destroy(&rd->read_lock); - kfree(rd); } |