Browse Source

qcacld-3.0: Fix cds_is_load_unload_in_progress API

cds_is_load_unload_in_progress is checking for both driver
load AND unload states. This is leading to all external threads
still enter in driver when driver has already started unload
clean up process. Fix this API to check either load OR unload
in progress driver states.

Change-Id: I4cd446393346bc5c085bc9a92ee68f46f1ec5097
CRs-Fixed: 964211
Rajeev Kumar 9 years ago
parent
commit
e04c726b30
1 changed files with 3 additions and 3 deletions
  1. 3 3
      core/cds/inc/cds_api.h

+ 3 - 3
core/cds/inc/cds_api.h

@@ -116,14 +116,14 @@ static inline bool cds_is_driver_recovering(void)
 /**
  * cds_is_load_unload_in_progress() - Is driver load/unload in progress
  *
- * Return: true if driver is loading or unloading and false otherwise.
+ * Return: true if driver is loading OR unloading and false otherwise.
  */
 static inline bool cds_is_load_unload_in_progress(void)
 {
 	enum cds_driver_state state = cds_get_driver_state();
 
-	return __CDS_IS_DRIVER_STATE(state, CDS_DRIVER_STATE_LOADING |
-				     CDS_DRIVER_STATE_UNLOADING);
+	return __CDS_IS_DRIVER_STATE(state, CDS_DRIVER_STATE_LOADING) ||
+		__CDS_IS_DRIVER_STATE(state, CDS_DRIVER_STATE_UNLOADING);
 }
 
 /**