提交 39f55c61 编写于 作者: A Arnd Bergmann 提交者: Thierry Reding

drm/tegra: Fix non-debugfs builds

The new debugfs registration fails to build when CONFIG_DEBUGFS is
disabled, because the drm_crtc structure is lacking a member in that
configuration:

drivers/gpu/drm/tegra/dc.c: In function 'tegra_dc_late_register':
drivers/gpu/drm/tegra/dc.c:1204:28: error: 'struct drm_crtc' has no member named 'debugfs_entry'

Without CONFIG_DEBUGFS, the rest of the function already degrades
into nothing, so we just avoid the one assignment.

Fixes: b95800ee ("drm/tegra: dc: Register debugfs in ->late_register()")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 72ba4cf5
...@@ -1242,10 +1242,16 @@ static int tegra_dc_late_register(struct drm_crtc *crtc) ...@@ -1242,10 +1242,16 @@ static int tegra_dc_late_register(struct drm_crtc *crtc)
{ {
unsigned int i, count = ARRAY_SIZE(debugfs_files); unsigned int i, count = ARRAY_SIZE(debugfs_files);
struct drm_minor *minor = crtc->dev->primary; struct drm_minor *minor = crtc->dev->primary;
struct dentry *root = crtc->debugfs_entry; struct dentry *root;
struct tegra_dc *dc = to_tegra_dc(crtc); struct tegra_dc *dc = to_tegra_dc(crtc);
int err; int err;
#ifdef CONFIG_DEBUG_FS
root = crtc->debugfs_entry;
#else
root = NULL;
#endif
dc->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), dc->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files),
GFP_KERNEL); GFP_KERNEL);
if (!dc->debugfs_files) if (!dc->debugfs_files)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册