From d8508cb9b80fed958c831195e4f2a3be2a7a97b9 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Tue, 19 Jan 2016 15:05:09 -0800 Subject: [PATCH] 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 --- core/cds/inc/cds_api.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index 059a0d1dea98..588f0e2c176b 100644 --- a/core/cds/inc/cds_api.h +++ b/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); } /**