From: Thierry Reding Subject: [PATCH] drm: Implement dummies for debugfs helpers Date: Thu, 12 Dec 2013 15:44:04 +0100 Message-ID: <1386859444-1693-1-git-send-email-treding@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-bk0-f43.google.com (mail-bk0-f43.google.com [209.85.214.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 0CE63FB55C for ; Thu, 12 Dec 2013 06:45:20 -0800 (PST) Received: by mail-bk0-f43.google.com with SMTP id mz12so903696bkb.2 for ; Thu, 12 Dec 2013 06:45:18 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: David Airlie Cc: dri-devel@lists.freedesktop.org, Arnd Bergmann , linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org 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 --- include/drm/drmP.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 1d4a920ef7ff..28beb385380c 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1461,6 +1461,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 */ -- 1.8.4.2