drm/tegra: Use conftest for drm_debugfs_remove_files()

The function drm_debugfs_remove_file() has extra argument in
Linux 6.7 with change commit 8e455145d8f16 ("drm/debugfs: rework
drm_debugfs_create_files implementation v2")

Use conftest to findout this new argument presence.

Bug 4346767

Change-Id: I77346a85c8841f915f4a8f3f471af1e03240fa62
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028576
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-12-05 11:29:55 +00:00
committed by mobile promotions
parent 54e431bcc9
commit 1ae406004f
7 changed files with 37 additions and 34 deletions

View File

@@ -1717,17 +1717,11 @@ static void tegra_sor_early_unregister(struct drm_connector *connector)
struct tegra_output *output = connector_to_output(connector);
unsigned int count = ARRAY_SIZE(debugfs_files);
struct tegra_sor *sor = to_sor(output);
#if defined(NV_DRM_DEBUGFS_REMOVE_HAS_ROOT_ARGS)
struct dentry *root;
#ifdef CONFIG_DEBUG_FS
root = connector->debugfs_entry;
#else
root = NULL;
#endif
#if defined(NV_DRM_DEBUGFS_REMOVE_FILES_HAS_ROOT_ARG) /* Linux v6.7 */
drm_debugfs_remove_files(sor->debugfs_files, count,
root, connector->dev->primary);
connector->debugfs_entry,
connector->dev->primary);
#else
drm_debugfs_remove_files(sor->debugfs_files, count,