From 2c6bde3ecdbd9ec99e53e05f4b45d90b82a370d3 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Sat, 24 Jun 2017 12:49:10 -0700 Subject: qcacld-3.0: Create WMI debugfs only if WLAN_DEBUGFS is defined WMI FW log debug FS is created irrespective of WLAN_DEBUGFS is defined or not. Make sure to only create WMI log debugfs only if WLAN_DEBUGFS is defined. Change-Id: I8d7d5ef160ce2674b3f01dc7afa3ac4761538cab CRs-Fixed: 2066664 --- core/utils/fwlog/dbglog_host.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/core/utils/fwlog/dbglog_host.c b/core/utils/fwlog/dbglog_host.c index 98ac0b4815ec..ebf75e7a7d37 100644 --- a/core/utils/fwlog/dbglog_host.c +++ b/core/utils/fwlog/dbglog_host.c @@ -4088,25 +4088,39 @@ static const struct file_operations fops_dbglog_block = { .llseek = default_llseek, }; -static int dbglog_debugfs_init(wmi_unified_t wmi_handle) +#ifdef WLAN_DEBUGFS + +static void dbglog_debugfs_init(wmi_unified_t wmi_handle) { wmi_handle->debugfs_phy = debugfs_create_dir(CLD_DEBUGFS_DIR, NULL); - if (!wmi_handle->debugfs_phy) - return -ENOMEM; + if (!wmi_handle->debugfs_phy) { + qdf_print("Failed to create WMI debugfs"); + return; + } debugfs_create_file(DEBUGFS_BLOCK_NAME, 0400, wmi_handle->debugfs_phy, &wmi_handle->dbglog, &fops_dbglog_block); - - return true; } -static int dbglog_debugfs_remove(wmi_unified_t wmi_handle) +static void dbglog_debugfs_remove(wmi_unified_t wmi_handle) { debugfs_remove_recursive(wmi_handle->debugfs_phy); - return true; } + +#else + +static void dbglog_debugfs_init(wmi_unified_t wmi_handle) +{ +} + +static void dbglog_debugfs_remove(wmi_unified_t wmi_handle) +{ +} + +#endif /* End of WLAN_DEBUGFS */ + #endif /* WLAN_OPEN_SOURCE */ /** -- cgit v1.2.3