From 649b353b012adc4980d26586eee53b6aa2950c97 Mon Sep 17 00:00:00 2001 From: Sahil Mukund Patki Date: Mon, 25 Oct 2021 12:23:05 +0000 Subject: [PATCH] tegra: soc_hwpm: Fix debugfs compilation errors The member debugfs_root is only defined in struct tegra_soc_hwpm when debugfs is enabled. So its use when debugfs is disabled leads to compilation errors which is seen in function tegra_soc_hwpm_debugfs_init. This function when debugfs disabled just sets the debugfs_root to NULL. This has been removed to fix the compilation error. Bug 200755555 Change-Id: I6e4fa7e330dbe468ba216e98d29d58877e250fa4 Signed-off-by: Sahil Mukund Patki Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2616087 Reviewed-by: svcacv Reviewed-by: Deepak Nibade Reviewed-by: Bharat Nihalani Reviewed-by: Sachin Nikam Reviewed-by: svc_kernel_abi Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- tegra-soc-hwpm.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tegra-soc-hwpm.h b/tegra-soc-hwpm.h index 7215bfa..5a40def 100644 --- a/tegra-soc-hwpm.h +++ b/tegra-soc-hwpm.h @@ -102,10 +102,7 @@ extern const struct file_operations tegra_soc_hwpm_ops; void tegra_soc_hwpm_debugfs_init(struct tegra_soc_hwpm *hwpm); void tegra_soc_hwpm_debugfs_deinit(struct tegra_soc_hwpm *hwpm); #else -static inline void tegra_soc_hwpm_debugfs_init(struct tegra_soc_hwpm *hwpm) -{ - hwpm->debugfs_root = NULL; -} +static inline void tegra_soc_hwpm_debugfs_init(struct tegra_soc_hwpm *hwpm) {} static inline void tegra_soc_hwpm_debugfs_deinit(struct tegra_soc_hwpm *hwpm) {} #endif /* CONFIG_DEBUG_FS */