diff mbox

[8/8] drm: Remove debugfs_cleanup callback from drivers

Message ID 1373223745-9095-8-git-send-email-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson July 7, 2013, 7:02 p.m. UTC
No driver did anything other than remove its lists of debugfs inodes
which is now handled by the core. So having removed all the driver
callbacks, we can now remove the hook from the core.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/drm_debugfs.c | 5 -----
 include/drm/drmP.h            | 1 -
 2 files changed, 6 deletions(-)

Comments

Daniel Vetter July 8, 2013, 8:21 p.m. UTC | #1
On Sun, Jul 07, 2013 at 08:02:25PM +0100, Chris Wilson wrote:
> No driver did anything other than remove its lists of debugfs inodes
> which is now handled by the core. So having removed all the driver
> callbacks, we can now remove the hook from the core.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Dave Airlie <airlied@redhat.com>

Don't we have an unused drm_debugfs_remove_files function now? Otherwise
this makes tons of sense imo, so on the series:

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_debugfs.c | 5 -----
>  include/drm/drmP.h            | 1 -
>  2 files changed, 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
> index b855fd7..c09406e 100644
> --- a/drivers/gpu/drm/drm_debugfs.c
> +++ b/drivers/gpu/drm/drm_debugfs.c
> @@ -221,14 +221,9 @@ EXPORT_SYMBOL(drm_debugfs_remove_files);
>   */
>  int drm_debugfs_cleanup(struct drm_minor *minor)
>  {
> -	struct drm_device *dev = minor->dev;
> -
>  	if (!minor->debugfs_root)
>  		return 0;
>  
> -	if (dev->driver->debugfs_cleanup)
> -		dev->driver->debugfs_cleanup(minor);
> -
>  	while (!list_empty(&minor->debugfs_list)) {
>  		struct drm_info_node *node =
>  			list_first_entry(&minor->debugfs_list,
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index 82670ac..a493f77 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -902,7 +902,6 @@ struct drm_driver {
>  			    bool from_release);
>  
>  	int (*debugfs_init)(struct drm_minor *minor);
> -	void (*debugfs_cleanup)(struct drm_minor *minor);
>  
>  	/**
>  	 * Driver-specific constructor for drm_gem_objects, to set up
> -- 
> 1.8.3.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index b855fd7..c09406e 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -221,14 +221,9 @@  EXPORT_SYMBOL(drm_debugfs_remove_files);
  */
 int drm_debugfs_cleanup(struct drm_minor *minor)
 {
-	struct drm_device *dev = minor->dev;
-
 	if (!minor->debugfs_root)
 		return 0;
 
-	if (dev->driver->debugfs_cleanup)
-		dev->driver->debugfs_cleanup(minor);
-
 	while (!list_empty(&minor->debugfs_list)) {
 		struct drm_info_node *node =
 			list_first_entry(&minor->debugfs_list,
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 82670ac..a493f77 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -902,7 +902,6 @@  struct drm_driver {
 			    bool from_release);
 
 	int (*debugfs_init)(struct drm_minor *minor);
-	void (*debugfs_cleanup)(struct drm_minor *minor);
 
 	/**
 	 * Driver-specific constructor for drm_gem_objects, to set up