diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-12-18 08:44:46 -0500 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2017-12-21 08:52:38 -0500 |
commit | 39f55c61da49ba41bba4185043cba6f39229467f (patch) | |
tree | 16c94e36c5490177b27676b46df759db3fa92eb5 | |
parent | 72ba4cf52410c0426a299f2ac82acd38c27c8207 (diff) |
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: b95800eeef09 ("drm/tegra: dc: Register debugfs in ->late_register()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r-- | drivers/gpu/drm/tegra/dc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index dc91911094fc..a5fd18c45800 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c | |||
@@ -1242,10 +1242,16 @@ static int tegra_dc_late_register(struct drm_crtc *crtc) | |||
1242 | { | 1242 | { |
1243 | unsigned int i, count = ARRAY_SIZE(debugfs_files); | 1243 | unsigned int i, count = ARRAY_SIZE(debugfs_files); |
1244 | struct drm_minor *minor = crtc->dev->primary; | 1244 | struct drm_minor *minor = crtc->dev->primary; |
1245 | struct dentry *root = crtc->debugfs_entry; | 1245 | struct dentry *root; |
1246 | struct tegra_dc *dc = to_tegra_dc(crtc); | 1246 | struct tegra_dc *dc = to_tegra_dc(crtc); |
1247 | int err; | 1247 | int err; |
1248 | 1248 | ||
1249 | #ifdef CONFIG_DEBUG_FS | ||
1250 | root = crtc->debugfs_entry; | ||
1251 | #else | ||
1252 | root = NULL; | ||
1253 | #endif | ||
1254 | |||
1249 | dc->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), | 1255 | dc->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files), |
1250 | GFP_KERNEL); | 1256 | GFP_KERNEL); |
1251 | if (!dc->debugfs_files) | 1257 | if (!dc->debugfs_files) |