Commit 85eac470 authored by Noralf Trønnes's avatar Noralf Trønnes Committed by Daniel Vetter

drm/msm: Remove msm_debugfs_cleanup()

Move the contents of msm_debugfs_cleanup() to msm_drm_uninit() to free
up the drm_driver->debugfs_cleanup callback. Also remove the
mdp_kms_funcs->debugfs_cleanup callback which has no users.

Cc: robdclark@gmail.com
Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Acked-by: default avatarRob Clark <robdclark@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170307204924.1002-2-noralf@tronnes.org
parent 0621ce1d
...@@ -164,20 +164,5 @@ int msm_debugfs_init(struct drm_minor *minor) ...@@ -164,20 +164,5 @@ int msm_debugfs_init(struct drm_minor *minor)
return ret; return ret;
} }
void msm_debugfs_cleanup(struct drm_minor *minor)
{
struct drm_device *dev = minor->dev;
struct msm_drm_private *priv = dev->dev_private;
if (!priv)
return;
if (priv->kms->funcs->debugfs_cleanup)
priv->kms->funcs->debugfs_cleanup(priv->kms, minor);
msm_rd_debugfs_cleanup(minor);
msm_perf_debugfs_cleanup(minor);
}
#endif #endif
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
int msm_debugfs_init(struct drm_minor *minor); int msm_debugfs_init(struct drm_minor *minor);
void msm_debugfs_cleanup(struct drm_minor *minor);
#endif #endif
#endif /* __MSM_DEBUGFS_H__ */ #endif /* __MSM_DEBUGFS_H__ */
...@@ -241,6 +241,9 @@ static int msm_drm_uninit(struct device *dev) ...@@ -241,6 +241,9 @@ static int msm_drm_uninit(struct device *dev)
drm_dev_unregister(ddev); drm_dev_unregister(ddev);
msm_perf_debugfs_cleanup(priv);
msm_rd_debugfs_cleanup(priv);
#ifdef CONFIG_DRM_FBDEV_EMULATION #ifdef CONFIG_DRM_FBDEV_EMULATION
if (fbdev && priv->fbdev) if (fbdev && priv->fbdev)
msm_fbdev_free(ddev); msm_fbdev_free(ddev);
...@@ -836,7 +839,6 @@ static struct drm_driver msm_driver = { ...@@ -836,7 +839,6 @@ static struct drm_driver msm_driver = {
.gem_prime_mmap = msm_gem_prime_mmap, .gem_prime_mmap = msm_gem_prime_mmap,
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
.debugfs_init = msm_debugfs_init, .debugfs_init = msm_debugfs_init,
.debugfs_cleanup = msm_debugfs_cleanup,
#endif #endif
.ioctls = msm_ioctls, .ioctls = msm_ioctls,
.num_ioctls = DRM_MSM_NUM_IOCTLS, .num_ioctls = DRM_MSM_NUM_IOCTLS,
......
...@@ -304,10 +304,10 @@ void msm_gem_describe_objects(struct list_head *list, struct seq_file *m); ...@@ -304,10 +304,10 @@ void msm_gem_describe_objects(struct list_head *list, struct seq_file *m);
void msm_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m); void msm_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m);
int msm_debugfs_late_init(struct drm_device *dev); int msm_debugfs_late_init(struct drm_device *dev);
int msm_rd_debugfs_init(struct drm_minor *minor); int msm_rd_debugfs_init(struct drm_minor *minor);
void msm_rd_debugfs_cleanup(struct drm_minor *minor); void msm_rd_debugfs_cleanup(struct msm_drm_private *priv);
void msm_rd_dump_submit(struct msm_gem_submit *submit); void msm_rd_dump_submit(struct msm_gem_submit *submit);
int msm_perf_debugfs_init(struct drm_minor *minor); int msm_perf_debugfs_init(struct drm_minor *minor);
void msm_perf_debugfs_cleanup(struct drm_minor *minor); void msm_perf_debugfs_cleanup(struct msm_drm_private *priv);
#else #else
static inline int msm_debugfs_late_init(struct drm_device *dev) { return 0; } static inline int msm_debugfs_late_init(struct drm_device *dev) { return 0; }
static inline void msm_rd_dump_submit(struct msm_gem_submit *submit) {} static inline void msm_rd_dump_submit(struct msm_gem_submit *submit) {}
......
...@@ -64,7 +64,6 @@ struct msm_kms_funcs { ...@@ -64,7 +64,6 @@ struct msm_kms_funcs {
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
/* debugfs: */ /* debugfs: */
int (*debugfs_init)(struct msm_kms *kms, struct drm_minor *minor); int (*debugfs_init)(struct msm_kms *kms, struct drm_minor *minor);
void (*debugfs_cleanup)(struct msm_kms *kms, struct drm_minor *minor);
#endif #endif
}; };
......
...@@ -231,13 +231,12 @@ int msm_perf_debugfs_init(struct drm_minor *minor) ...@@ -231,13 +231,12 @@ int msm_perf_debugfs_init(struct drm_minor *minor)
return 0; return 0;
fail: fail:
msm_perf_debugfs_cleanup(minor); msm_perf_debugfs_cleanup(priv);
return -1; return -1;
} }
void msm_perf_debugfs_cleanup(struct drm_minor *minor) void msm_perf_debugfs_cleanup(struct msm_drm_private *priv)
{ {
struct msm_drm_private *priv = minor->dev->dev_private;
struct msm_perf_state *perf = priv->perf; struct msm_perf_state *perf = priv->perf;
if (!perf) if (!perf)
......
...@@ -245,13 +245,12 @@ int msm_rd_debugfs_init(struct drm_minor *minor) ...@@ -245,13 +245,12 @@ int msm_rd_debugfs_init(struct drm_minor *minor)
return 0; return 0;
fail: fail:
msm_rd_debugfs_cleanup(minor); msm_rd_debugfs_cleanup(priv);
return -1; return -1;
} }
void msm_rd_debugfs_cleanup(struct drm_minor *minor) void msm_rd_debugfs_cleanup(struct msm_drm_private *priv)
{ {
struct msm_drm_private *priv = minor->dev->dev_private;
struct msm_rd_state *rd = priv->rd; struct msm_rd_state *rd = priv->rd;
if (!rd) if (!rd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment