mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
When kernel command line debugfs=off is specified instead of disabling CONFIG_DEBUG_FS in defconfig to disable Debug-FS, debugfs functions like debugfs_create_dir will fail. Use function debugfs_initialized() to check if debugfs functionality is enabled before calling any debugfs functions. This allows us to by-pass debugfs initialization if debugfs is not enabled. Also, there is no need to protect debugfs related code under CONFIG_DEBUG_FS, as stub functions for all debugfs APIs are defined when CONFIG_DEBUG_FS is disabled. Bug 3752450 Change-Id: I1aa2c46bc822da54fdc87504ac75c91845e02c12 Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2820666 Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com> Reviewed-by: Dara Ramesh <dramesh@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>