Skip to content

Commit

Permalink
drm: Implement dummies for debugfs helpers
Browse files Browse the repository at this point in the history
In case where debugfs support is disabled, define dummy functions to
avoid the need for #ifdefery in drivers.

Based on an earlier patch by Arnd Bergmann.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Thierry Reding authored and Dave Airlie committed Dec 18, 2013
1 parent 46eeb2c commit 66ee52e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions include/drm/drmP.h
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,30 @@ extern int drm_debugfs_create_files(const struct drm_info_list *files,
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);
#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)
{
return 0;
}

static inline int drm_debugfs_remove_files(const struct drm_info_list *files,
int count, struct drm_minor *minor)
{
return 0;
}

static inline int drm_debugfs_cleanup(struct drm_minor *minor)
{
return 0;
}
#endif

/* Info file support */
Expand Down

0 comments on commit 66ee52e

Please sign in to comment.