summaryrefslogtreecommitdiff
path: root/core/utils
diff options
context:
space:
mode:
authorRajeev Kumar <rajekuma@codeaurora.org>2017-06-24 12:49:10 -0700
committersnandini <snandini@codeaurora.org>2017-06-26 16:48:11 -0700
commit2c6bde3ecdbd9ec99e53e05f4b45d90b82a370d3 (patch)
treecceb8863a634c48b551ad6f505792c5db64c9c39 /core/utils
parenta130461b91c6c1175f7247d343af4bbba8a05c6f (diff)
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
Diffstat (limited to 'core/utils')
-rw-r--r--core/utils/fwlog/dbglog_host.c28
1 files 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 */
/**