diff --git a/htc/htc.c b/htc/htc.c index 06c1ea4ff3..41ff94c816 100644 --- a/htc/htc.c +++ b/htc/htc.c @@ -253,8 +253,26 @@ int htc_runtime_resume(HTC_HANDLE htc_ctx) qdf_sched_work(0, &target->queue_kicker); return 0; } + +/** + * htc_runtime_pm_deinit(): runtime pm related de-intialization + * + * need to de-initialize the work item. + * + * @target: HTC target pointer + * + */ +static void htc_runtime_pm_deinit(HTC_TARGET *target) +{ + if (!target) + return; + + qdf_destroy_work(0, &target->queue_kicker); +} + #else static inline void htc_runtime_pm_init(HTC_TARGET *target) { } +static inline void htc_runtime_pm_deinit(HTC_TARGET *target) { } #endif #if defined(DEBUG_HL_LOGGING) && defined(CONFIG_HL_SUPPORT) @@ -839,6 +857,8 @@ void htc_stop(HTC_HANDLE HTCHandle) AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+htc_stop\n")); + htc_runtime_pm_deinit(target); + HTC_INFO("%s: endpoints cleanup\n", __func__); /* cleanup endpoints */ for (i = 0; i < ENDPOINT_MAX; i++) {