Hi On Tue, Sep 23, 2014 at 3:46 PM, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote: > In my header cleanup I've missed the debugfs functions completely. I'd actually prefer a drm_debugfs.h, but I have some local patches that refactor drm-debugfs stuff, anyway. So I can do it later myself: Reviewed-by: David Herrmann <dh.herrmann@xxxxxxxxx> Thanks David > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx> > --- > drivers/gpu/drm/drm_internal.h | 28 ++++++++++++++++++++++++++++ > include/drm/drmP.h | 25 ------------------------- > 2 files changed, 28 insertions(+), 25 deletions(-) > > diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h > index bc71be6f29e0..7cc0a3516871 100644 > --- a/drivers/gpu/drm/drm_internal.h > +++ b/drivers/gpu/drm/drm_internal.h > @@ -102,3 +102,31 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data, > int drm_dropmaster_ioctl(struct drm_device *dev, void *data, > struct drm_file *file_priv); > struct drm_master *drm_master_create(struct drm_minor *minor); > + > +/* drm_debugfs.c */ > +#if defined(CONFIG_DEBUG_FS) > +int drm_debugfs_init(struct drm_minor *minor, int minor_id, > + struct dentry *root); > +int drm_debugfs_cleanup(struct drm_minor *minor); > +int drm_debugfs_connector_add(struct drm_connector *connector); > +void drm_debugfs_connector_remove(struct drm_connector *connector); > +#else > +static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id, > + struct dentry *root) > +{ > + return 0; > +} > + > +static inline int drm_debugfs_cleanup(struct drm_minor *minor) > +{ > + return 0; > +} > + > +static inline int drm_debugfs_connector_add(struct drm_connector *connector) > +{ > + return 0; > +} > +static inline void drm_debugfs_connector_remove(struct drm_connector *connector) > +{ > +} > +#endif > diff --git a/include/drm/drmP.h b/include/drm/drmP.h > index 09dd6c77f152..9130c8bd9e09 100644 > --- a/include/drm/drmP.h > +++ b/include/drm/drmP.h > @@ -1037,23 +1037,12 @@ extern unsigned int drm_debug; > > /* Debugfs support */ > #if defined(CONFIG_DEBUG_FS) > -extern int drm_debugfs_init(struct drm_minor *minor, int minor_id, > - struct dentry *root); > extern int drm_debugfs_create_files(const struct drm_info_list *files, > int count, struct dentry *root, > struct drm_minor *minor); > extern int drm_debugfs_remove_files(const struct drm_info_list *files, > int count, struct drm_minor *minor); > -extern int drm_debugfs_cleanup(struct drm_minor *minor); > -extern int drm_debugfs_connector_add(struct drm_connector *connector); > -extern void drm_debugfs_connector_remove(struct drm_connector *connector); > #else > -static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id, > - struct dentry *root) > -{ > - return 0; > -} > - > static inline int drm_debugfs_create_files(const struct drm_info_list *files, > int count, struct dentry *root, > struct drm_minor *minor) > @@ -1066,20 +1055,6 @@ static inline int drm_debugfs_remove_files(const struct drm_info_list *files, > { > return 0; > } > - > -static inline int drm_debugfs_cleanup(struct drm_minor *minor) > -{ > - return 0; > -} > - > -static inline int drm_debugfs_connector_add(struct drm_connector *connector) > -{ > - return 0; > -} > -static inline void drm_debugfs_connector_remove(struct drm_connector *connector) > -{ > -} > - > #endif > > extern struct dma_buf *drm_gem_prime_export(struct drm_device *dev, > -- > 2.1.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel