qcacmn: Return success when debugfs is disabled
Currently, the QDF debugfs feature returns a no-support error code for the init call when the feature is compiled out. Instead, return success to avoid wlan load failure on some configurations and to make error checking by the caller more straight forward under all configurations. The deinit call also has the same problem, but none of the callers pay attention to the return status. Additionally, the deinit function returns success unconditionally when the feature is compiled in. Rather than changing the return status to success when the feature is compiled out, change the return type of the deinit function to void. Change-Id: Iac3a47505142e149f70c67c5ba6cf0b2428d9488 CRs-Fixed: 2336872
This commit is contained in:
@@ -70,9 +70,9 @@ QDF_STATUS qdf_debugfs_init(void);
|
|||||||
/**
|
/**
|
||||||
* qdf_debugfs_exit() - cleanup debugfs
|
* qdf_debugfs_exit() - cleanup debugfs
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS
|
* Return: None
|
||||||
*/
|
*/
|
||||||
QDF_STATUS qdf_debugfs_exit(void);
|
void qdf_debugfs_exit(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_debugfs_create_dir() - create a debugfs directory
|
* qdf_debugfs_create_dir() - create a debugfs directory
|
||||||
@@ -244,13 +244,10 @@ void qdf_debugfs_remove_file(qdf_dentry_t d);
|
|||||||
|
|
||||||
static inline QDF_STATUS qdf_debugfs_init(void)
|
static inline QDF_STATUS qdf_debugfs_init(void)
|
||||||
{
|
{
|
||||||
return QDF_STATUS_E_NOSUPPORT;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QDF_STATUS qdf_debugfs_exit(void)
|
static inline void qdf_debugfs_exit(void) { }
|
||||||
{
|
|
||||||
return QDF_STATUS_E_NOSUPPORT;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline qdf_dentry_t qdf_debugfs_create_dir(const char *name,
|
static inline qdf_dentry_t qdf_debugfs_create_dir(const char *name,
|
||||||
qdf_dentry_t parent)
|
qdf_dentry_t parent)
|
||||||
|
@@ -46,15 +46,13 @@ QDF_STATUS qdf_debugfs_init(void)
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_debugfs_init);
|
qdf_export_symbol(qdf_debugfs_init);
|
||||||
|
|
||||||
QDF_STATUS qdf_debugfs_exit(void)
|
void qdf_debugfs_exit(void)
|
||||||
{
|
{
|
||||||
if (!qdf_debugfs_root)
|
if (!qdf_debugfs_root)
|
||||||
return QDF_STATUS_SUCCESS;
|
return;
|
||||||
|
|
||||||
debugfs_remove_recursive(qdf_debugfs_root);
|
debugfs_remove_recursive(qdf_debugfs_root);
|
||||||
qdf_debugfs_root = NULL;
|
qdf_debugfs_root = NULL;
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_debugfs_exit);
|
qdf_export_symbol(qdf_debugfs_exit);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user