qcacmn: 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
Esse commit está contido em:

commit de
Gerrit - the friendly Code Review server

pai
b586792e63
commit
e501f2c62f
@@ -4091,25 +4091,41 @@ 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 debug fs");
|
||||
return;
|
||||
}
|
||||
|
||||
debugfs_create_file(DEBUGFS_BLOCK_NAME, S_IRUSR,
|
||||
wmi_handle->debugfs_phy, &wmi_handle->dbglog,
|
||||
&fops_dbglog_block);
|
||||
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
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 */
|
||||
|
||||
/**
|
||||
|
Referência em uma nova issue
Block a user